# tf_agents.specs.tensor_spec.add_outer_dims_nest

<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/specs/tensor_spec.py#L472-L503) |

Adds outer dimensions to the shape of input specs.

    tf_agents.specs.tensor_spec.add_outer_dims_nest(
        specs, outer_dims
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `specs` | Nested list/tuple/dict of TensorSpecs/ArraySpecs, describing the shape of tensors. |
| `outer_dims` | a list or tuple, representing the outer shape to be added to the TensorSpecs in specs. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Nested TensorSpecs with outer dimensions added to the shape of input specs. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `ValueError` | if any outer_dims is neither a list nor tuple. |

<br />