Fold
- class torch.nn.Fold(output_size, kernel_size, dilation=1, padding=0, stride=1)
Combines an array of sliding local blocks into a large containing tensor.
Consider a batched
tensor containing sliding local blocks, e.g., patches of images, of shape , where is batch dimension, is the number of values within a block (a block has spatial locations each containing a -channeled vector), and is the total number of blocks. (This is exactly the same specification as the output shape of .) This operation combines these local blocks into the large tensor of shape by summing the overlapping values. Similar to , the arguments must satisfy