tf.nn.bias_add

View source on GitHub

Adds bias to value.

tf.nn.bias_add(
    value, bias, data_format=None, name=None
)

This is (mostly) a special case of tf.add where bias is restricted to 1-D. Broadcasting is supported, so value may have any number of dimensions. Unlike tf.add, the type of bias is allowed to differ from value in the case where both types are quantized.

Args:

Returns:

A Tensor with the same type as value.

Raises:

ValueError if data format is unrecognized, if value has less than two dimensions when data_format is 'N..C'/None or value has less then three dimensions when data_format is NC.., if bias does not have exactly one dimension (is a vector), or if the size of bias does not match the size of the channel dimension of value.