Method Clip
Clip(TensorFloat, float, float)
Computes an output tensor by applying the element-wise Clip
math function: f(x) = clamp(X, min, max).
Declaration
public TensorFloat Clip(TensorFloat X, float min, float max)
Parameters
Type | Name | Description |
---|---|---|
TensorFloat | X | The input tensor. |
float | min | The lower clip value. |
float | max | The upper clip value. |
Returns
Type | Description |
---|---|
TensorFloat | The computed output tensor. |
Clip(TensorInt, int, int)
Computes an output tensor by applying the element-wise Clip
math function: f(x) = clamp(X, min, max).
Declaration
public TensorInt Clip(TensorInt X, int min, int max)
Parameters
Type | Name | Description |
---|---|---|
TensorInt | X | The input tensor. |
int | min | The lower clip value. |
int | max | The upper clip value. |
Returns
Type | Description |
---|---|
TensorInt | The computed output tensor. |