# tf_agents.specs.zero_spec_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#L436-L469) |

Create zero tensors for a given spec.

#### View aliases


**Main aliases**

[`tf_agents.specs.tensor_spec.zero_spec_nest`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/specs/zero_spec_nest)

<br />

    tf_agents.specs.zero_spec_nest(
        specs, outer_dims=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `specs` | A nest of `TensorSpec`. |
| `outer_dims` | An optional list of constants or `Tensor` specifying outer dimensions to add to the spec shape before sampling. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A nest of zero tensors matching `specs`, with the optional outer dimensions added. ||

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `TypeError` | If `specs` is an unknown type. |
| `NotImplementedError` | If `specs` contains non-dense tensor specs. |

<br />