Given that *torch.nn.Unfold* can be used to unroll 2D convolutions, so that they can be computed using Vector Matrix Multiplication (VMMs), and that the same unrolling approach can be used to compute 3D convolutions as VMMs (described in https://www.mdpi.com/2079-9292/8/1/65/pdf), how can PyTorch be used to unroll 3D convolutions?

There is currently no native implementation of *torch.nn.Unfold* for 5D tensors, however, a response on https://github.com/pytorch/pytorch/issues/30798 indicates that *x.unfold(2, k, s).unfold(3, k, s).unfold(4, k, s)* can be used. Unfortunately, using this approach, I can’t seem to get the same result as using *torch.nn.Conv3d* when the same filter weights are used and biases are disabled.

Any help would be greatly appreciated!