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.