ClikaRT::ops::fold
function
fold()
Tensor fold(
Tensor input,
ClikaRT::Span<const std::int64_t> output_size,
ClikaRT::Span<const std::int64_t> kernel_size,
ClikaRT::Span<const std::int64_t> dilation = {},
ClikaRT::Span<const std::int64_t> padding = {},
ClikaRT::Span<const std::int64_t> stride = {},
PadMode mode = PadMode::Constant,
std::optional<double> value = std::nullopt
)
col2im: the inverse of unfold; it sums overlapping windows back into a channels-last image.
Input [N, L, prod(kernel_size), C]; overlapping window contributions ADD (so fold(unfold(x)) multiplies overlapped elements by their coverage count).
Parameters
input:[N, L, prod(kernel_size), C].output_size: the spatial extents of the reconstructed image.kernel_size: per-dim window extents.dilation: per-dim window dilation; empty (the default) is 1 per dim.padding: the(low, high)zero-padding pairs per spatial axis; empty (the default) pads nothing.stride: per-dim window step; empty (the default) is 1 per dim.
Throws
ClikaRT::Error: when the input's dtype/shape is not served for this operation (the machine-readable reason ridescode_name()).
Returns: channels-last [N, output_size.., C].
Declared in ClikaRT/compute/ops.h, line 1951