# tf_agents.distributions.utils.DistributionSpecV2

<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/distributions/utils.py#L571-L631) |

Describes a tfp.distribution.Distribution using nested parameters.

    tf_agents.distributions.utils.DistributionSpecV2(
        event_shape: tf.TensorShape,
        dtype: tf.DType,
        parameters: https://www.tensorflow.org/agents/api_docs/python/tf_agents/distributions/utils/Params
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `event_shape` | The distribution's `event_shape`. This is the shape that `distribution.sample()` returns. `distribution.sample(sample_shape)` returns tensors of shape `sample_shape + event_shape`. |
| `dtype` | The distribution's `dtype`. |
| `parameters` | The recursive parameters of the distribution, with tensors having directly been converted to [`tf.TypeSpec`](https://www.tensorflow.org/api_docs/python/tf/TypeSpec) objects. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `TypeError` | If for any entry `x` in `parameters`: [`tf.is_tensor(x)`](https://www.tensorflow.org/api_docs/python/tf/is_tensor). |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `dtype` | <br /> <br /> |
| `event_shape` | <br /> <br /> |
| `event_spec` | <br /> <br /> |
| `parameters` | <br /> <br /> |

<br />

## Methods

### `__eq__`

[View source](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/distributions/utils.py#L615-L621)

    __eq__(
        other
    )

Return self==value.