tf.keras.backend.bias_add

Adds a bias vector to a tensor.

Compat aliases for migration

See Migration guide for more details.

tf.compat.v1.keras.backend.bias_add, `tf.compat.v2.keras.backend.bias_add`

x Tensor or variable.
bias Bias tensor to add.
data_format string, "channels_last" or "channels_first".

Output tensor.

ValueError In one of the two cases below:

  1. invalid data_format argument.
  2. invalid bias shape. the bias should be either a vector or a tensor with ndim(x) - 1 dimension