Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tf_agents.specs.tensor_spec.sample_bounded_spec

View source on GitHub

Samples uniformily the given bounded spec.

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

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.

Returns:

A Tensor sample of the requested spec.