clip function

VARP clip(
  1. VARP x,
  2. double aMin,
  3. double aMax
)

Implementation

VARP clip(VARP x, double aMin, double aMax) {
  return F.cast(
    F.ReLU6(F.cast<float32>(x), minValue: aMin, maxValue: aMax),
    dtype: x.dtype,
  );
}