Python module
clamp
clamp()β
max.nn.clamp.clamp(x, min=None, max=None)
Clamps values in x to [min, max].
-
Parameters:
-
- x (TensorValue) β Input tensor to clamp.
- min (float | None) β Minimum value. If
None, no lower bound is applied. - max (float | None) β Maximum value. If
None, no upper bound is applied.
-
Returns:
-
Clamped tensor.
-
Return type:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!