View source on GitHub |
Clips value to a given bounded tensor spec.
tf_agents.utils.common.clip_to_spec(
value, spec
)
Args | |
---|---|
value
|
(tensor) value to be clipped. |
spec
|
(BoundedTensorSpec) spec containing min. and max. values for clipping. |
Returns | |
---|---|
clipped_value
|
(tensor) value clipped to be compatible with spec .
|