ClikaRT::ops::hardtanh
function
hardtanh()
Clamps every element to [min_val, max_val].
Parameters
x: the input tensor.min_val: the lower bound. Default-1.0.max_val: the upper bound. Default1.0.
Throws
ClikaRT::Error: when the input's dtype is not served for this operation (the machine-readable reason ridescode_name()).
Returns: a new tensor, same shape and dtype as x.
auto y = ClikaRT::ops::hardtanh(x, 0.0, 6.0); // == relu6
Declared in ClikaRT/compute/ops.h, line 869