# tf_agents.keras_layers.BiasLayer

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/keras_layers/bias_layer.py#L24-L85) |

Keras layer that only adds a bias to the input.

#### View aliases


**Main aliases**

[`tf_agents.keras_layers.bias_layer.BiasLayer`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/keras_layers/BiasLayer)

<br />

    tf_agents.keras_layers.BiasLayer(
        bias_initializer='zeros', **kwargs
    )

`BiasLayer` implements the operation:
`output = input + bias`

<br />

<br />

<br />

| ## Args ||
|---|---|
| `bias_initializer` | Initializer for the bias vector. |

<br />

<br />

<br />

<br />

| ## Input shape ||
|---|---|
| nD tensor with shape: `(batch_size, ..., input_dim)`. The most common situation would be a 2D input with shape `(batch_size, input_dim)`. Note a rank of at least 2 is required. ||

<br />

<br />

<br />

<br />

| ## Output shape ||
|---|---|
| nD tensor with shape: `(batch_size, ..., input_dim)`. For instance, for a 2D input with shape `(batch_size, input_dim)`, the output would have shape `(batch_size, input_dim)`. ||

<br />