Skip to main content

ClikaRT::ops::relu

function

relu()

Tensor relu(Tensor x)

Rectified linear unit.

relu(x)=max(0,x)\mathrm{relu}(x) = \max(0, x)

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::relu(x);

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