# tf_agents.specs.tensor_spec.sample_bounded_spec

<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#L235-L311) |

Samples uniformily the given bounded spec.

    tf_agents.specs.tensor_spec.sample_bounded_spec(
        spec, seed=None, outer_dims=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `spec` | A BoundedSpec to sample. |
| `seed` | A seed used for sampling ops |
| `outer_dims` | An optional `Tensor` specifying outer dimensions to add to the spec shape before sampling. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A Tensor sample of the requested spec. ||

<br />