Baremetal-NN
Baremetal-NN API documentation
Loading...
Searching...
No Matches

◆ NN_clip()

void NN_clip ( Tensor y,
const Tensor x,
float  min,
float  max 
)

Clamps all elements in input into the range [ min, max ]. Letting min_value and max_value be min and max, respectively, this returns:

y_i = min(max(x_i, min_value), max_value)

Parameters
outthe output tensor
athe input tensor
minlower-bound of the range to be clamped to
maxupper-bound of the range to be clamped to