Function constrain

  • Constrains the value of each tensor element between a minimum and maximum value.

    Parameters

    • t: Tensor

      the input tensor

    • low: number

      the minimum value

    • high: number

      the maximum value

    Returns Tensor

    each tensor element constrained to the given range