what does it mean when kernel depth=1 in conv3d pytorch
I would like to understand the difference between conv2d and conv3d in PyTorch.
What is the difference between:
conv3d(in, out, kernel_size(1,3,3))

and
conv2d(in,out,kernel_size(3,3))

I checked the official documentation but I couldn't quite understand the difference between the two. Should conv3d in this case be the same as conv2d since the depth is 1? Any help would be appreciated.

Well to give an intuitive understanding of how a kernel works I would recommend to look how the cells(a.k.a Neurons) of a single feature layer are obtained.
For the 2D convolution you have the hight and width of the kernel layer(KL) that goes over a single feature layer(FL) from a 2D convolutional layers(CL). Because a CL can have numerous FLs, multiple KLs are then created in parallel and placed over the different FLs, so it can process them in parallel. This parallel processing is usually illustrated as a &quot;stacked&quot; structure of KLs, which is usually named just Kernel. Not only the singularity of the name &quot;Kernel&quot; from this plural structure can leads to confusion, but also the fact that the parallel processing of KLs are illustrated commonly as a stacking of KLs, creating an illusion of a depth dimension.
So important to remember: this is not a third dimension, this is just a parallel processing of KLs-FLs.
For a 3D convolution you need now 3D KL to process the 3D FL. This is now a true third dimension. The number of 3D KLs that will be &quot;stacked&quot;, will be automatically adjusted so it can process parallel the multiple 3D FLs from your network.
Regarding your question:
Indeed, a 3D kernel with a depth 1 is the same as a 2D kernel, however the functions are builded differently for the different cases. That is, 2D for images with two dimensions (hight, width), and 3D for Images with three dimensions (hight, width, depth).
