# tf_agents.specs.tensor_spec.remove_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#L543-L588) |

Removes the specified number of outer dimensions from the input spec nest.

    tf_agents.specs.tensor_spec.remove_outer_dims_nest(
        specs, num_outer_dims
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `specs` | Nested list/tuple/dict of TensorSpecs/ArraySpecs, describing the shape of tensors. |
| `num_outer_dims` | (int) Number of outer dimensions to remove. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Nested TensorSpecs with outer dimensions removed from the input specs. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| Value error if a spec in the nest has shape rank less than `num_outer_dims`. ||

<br />