tf_agents.utils.common.scale_to_spec

Shapes and scales a batch into the given spec bounds.

Used in the notebooks

Used in the tutorials

tensor A [batch x n] tensor with values in the range of [-1, 1].
spec (BoundedTensorSpec) to use for scaling the action.

A batch scaled the given spec bounds.