Clipping API of the tensor class. It is used to limit elements in a tensor between the specified minimum value and maximum value (elements smaller than the minimum value will be replaced with the minimum value, and elements greater than the maximum value will be replaced with the maximum value).
It is supported by the Atlas inference product and
clip(inputTensor: Tensor, minVal: float, maxVal: float)
Parameter |
Input/Output |
Description |
|---|---|---|
inputTensor |
Input |
Tensor class, supporting dtype.float16, dtype.float32, and dtype.uint8 data types. |
minVal |
Input |
Float type, minimum value after clipping in a tensor. Elements smaller than the minimum value will be replaced with the minimum value. The value of minVal must be less than or equal to that of maxVal. |
maxVal |
Input |
Float type, maximum value after clipping in a tensor. Elements greater than the maximum value will be replaced with the maximum value. The value of maxVal must be greater than or equal to that of minVal. |
Clipped tensor data