# tf.nn.bias_add

<br />

|---|---|
| [![](https://www.tensorflow.org/images/tf_logo_32px.png) TensorFlow 2 version](https://www.tensorflow.org/api_docs/python/tf/nn/bias_add) | [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/nn_ops.py#L2685-L2718) |

Adds `bias` to `value`.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.nn.bias_add`](https://www.tensorflow.org/api_docs/python/tf/nn/bias_add), \`tf.compat.v2.nn.bias_add\`

<br />

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

This is (mostly) a special case of [`tf.add`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/math/add) where `bias` is restricted to 1-D.
Broadcasting is supported, so `value` may have any number of dimensions.
Unlike [`tf.add`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/math/add), the type of `bias` is allowed to differ from `value` in the
case where both types are quantized.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `value` | A `Tensor` with type `float`, `double`, `int64`, `int32`, `uint8`, `int16`, `int8`, `complex64`, or `complex128`. |
| `bias` | A 1-D `Tensor` with size matching the channel dimension of `value`. Must be the same type as `value` unless `value` is a quantized type, in which case a different quantized type may be used. |
| `data_format` | A string. 'N...C' and 'NC...' are supported. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor` with the same type as `value`. ||

<br />