Clamp
class Clamp<T : DType, V>(ctx: ExecutionContext, val min: Float, val max: Float) : TensorTransform<T, V> (source)
Clamps tensor values to a specified range.
output = clamp(input, min, max)
Values below min are set to min, values above max are set to max.
Parameters
T
The tensor data type
V
The value type
ctx
The execution context for tensor operations
min
The minimum value (inclusive)
max
The maximum value (inclusive)