clamp

fun <I, T : DType, V> Transform<I, Tensor<T, V>>.clamp(ctx: ExecutionContext, min: Float, max: Float): Transform<I, Tensor<T, V>>(source)

Chains a Clamp transform that restricts values to a range.

Parameters

ctx

The execution context

min

Minimum value

max

Maximum value