# tf_agents.networks.expand_dims_layer.ExpandDims

<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/networks/expand_dims_layer.py#L25-L74) |

Expands dims along a particular axis.

    tf_agents.networks.expand_dims_layer.ExpandDims(
        axis, **kwargs
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `axis` | Axis to expand. A new dim is added before this axis. May be a negative value. Must not be a tensor. |

<br />

<br />

<br />

<br />

| ## Input shape ||
|---|---|
| `(batch_size,) + shape` ||

<br />

<br />

<br />

<br />

| ## Output shape ||
|---|---|
| `(batch_size,) + shape + [1]`, if `axis == -1`. <br /> `(batch_size,) + shape[:axis + 1] + [1] + shape[axis + 1:]`, if `axis < -1`. `(batch_size,) + shape[:axis] + [1] + shape[axis:]`, if `axis >= 0`. ||

<br />