W3cubDocs

/TensorFlow 2.3

tf.keras.backend.bias_add

View source on GitHub

Adds a bias vector to a tensor.

Arguments
x Tensor or variable.
bias Bias tensor to add.
data_format string, "channels_last" or "channels_first".
Returns
Output tensor.
Raises
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

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/python/tf/keras/backend/bias_add