ClikaRT::ops::threshold
function
threshold()
Elementwise threshold: keeps values above threshold, replaces the rest with value.
Parameters
x: the input tensor.threshold: the comparison bound.value: the replacement for elements at or below the bound.
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::threshold(x, 0.0, 0.0); // == relu
Declared in ClikaRT/compute/ops.h, line 1142