ClikaRT::ops::prelu
function
prelu()
Tensor prelu(Tensor x, OptionalTensor weight = {})
Parametric ReLU: a learned negative-side slope.
weight is a scalar or a per-channel tensor broadcast against x.
Parameters
x: the input tensor.weight: the negative-slope tensor (scalar or per-channel). Absent uses the weight held by the bound primitive (module usage).
Throws
ClikaRT::Error: whenweight's shape does not broadcast againstx, or when the dtype is not served (code_name()carries the reason).
Returns: a new tensor, same shape and dtype as x.
auto y = ClikaRT::ops::prelu(x, slopes); // slopes: [C] or scalar
Declared in ClikaRT/compute/ops.h, line 951