Attend the Women in ML Symposium on December 7 Register now

tf_agents.utils.common.clip_to_spec

Stay organized with collections Save and categorize content based on your preferences.

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.