torch.nn.functional. unfold (input, kernel_size, dilation=1, padding=0, stride=1 )[SOURCE] 1
Extracts sliding local blocks from an batched input tensor.
WARNING
Currently, only 4-D input tensors (batched image-like tensors) are supported.
See torch.nn.Unfold 4 for details