ClikaRT::ops::clamp_max
function
clamp_max()
Tensor clamp_max(Tensor x, ScalarOrTensor max)
Elementwise upper bound.
max is a scalar or a tensor broadcast against x (numpy rules).
Parameters
x: the input tensor.max: the upper bound; scalar or broadcastable tensor.
Throws
ClikaRT::Error: when a tensor bound 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::clamp_max(x, 6.0);
Declared in ClikaRT/compute/ops.h, line 4807