ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

tf_agents.utils.common.clip_to_spec

Clips value to a given bounded tensor spec.

value (tensor) value to be clipped.
spec (BoundedTensorSpec) spec containing min. and max. values for clipping.

clipped_value (tensor) value clipped to be compatible with spec.