ClikaRT::ops::stack
function
stack()
Tensor stack(ClikaRT::Span<const Tensor> tensors, int64_t dim = 0)
Join tensors along a NEW dim at position dim: all inputs share one shape; output rank = input rank + 1, the new dim sized N. Copies.
Throws
ClikaRT::Error: (INVALID_ARGUMENT) when the input shapes differ (code_name()carries the reason).
Returns: a new tensor of rank + 1.
auto batch = ClikaRT::ops::stack({a, b, c}); // [3, ..]
Declared in ClikaRT/compute/ops.h, line 3426