What I understood till now is that for a 3D array with dimensions A x B x C. Conv2d function of torch.nn, will take A as in_channel. However I am having a different situation. I am having 3D nifti images and loaded them using nibabel.load function and then converted them into numpy array, and then finally converted them to tensor using torch.from_numpy. So in mine case images have dimension, 512 x 512 x 50. Here Height = width = 512, and depth = 50. But if I use nn.conv2d function, then assumes that in_channels value is 512, because it is first dimension, but it is not. So how can I use conv2d function and tell it that in_channel value is the third dimension?