Skip to main content

ClikaRT::ops::relu6

function

relu6()

Tensor relu6(Tensor x)

ReLU capped at 6.

relu6(x)=clamp(x,  0,  6)\mathrm{relu6}(x) = \mathrm{clamp}(x,\; 0,\; 6)

Throws

  • ClikaRT::Error: when the input's dtype is not served for this operation (the machine-readable reason rides code_name()).

Returns: a new tensor, same shape and dtype as x.

auto y = ClikaRT::ops::relu6(x);

Declared in ClikaRT/compute/ops.h, line 979