ClikaRT::ops::unfold
function
unfold()
Tensor unfold(
Tensor input,
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
)
im2col: extracts sliding kernel windows from a channels-last input.
Input [N, spatial.., C] (1-D/2-D/3-D); output [N, L, prod(kernel_size), C] where L is the number of window placements; channels-last throughout (window samples sit next to channels).
Parameters
input: channels-last input, rank 3/4/5.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: [N, L, prod(kernel_size), C].
Declared in ClikaRT/compute/ops.h, line 1967