ClikaRT::ops::logsumexp
function
logsumexp()
Tensor logsumexp(
Tensor x,
ClikaRT::Span<const std::int64_t> dims,
bool keepdim = false
)
Numerically stable log(sum(exp(x))) over dims.
Computed with the max-shift trick, so large magnitudes do not overflow. dims is required here (no reduce-all default).
Parameters
x: the input tensor; float dtype.dims: axes to reduce.keepdim: keep reduced axes as size-1 dims; default false.
Returns: the reduced tensor; shape = x minus dims.
Throws
ClikaRT::Error: (INVALID_ARGUMENT) on an out-of-rangedimsentry or a non-float input.
Declared in ClikaRT/compute/ops.h, line 4273