Skip to main content

ClikaRT::ops::clamp

function

clamp()

Tensor clamp(
    Tensor x,
    std::optional<ScalarOrTensor> min = std::nullopt,
    std::optional<ScalarOrTensor> max = std::nullopt
)

Clamp x into [min, max]; an empty bound leaves that side unbounded.

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