Is the Conv2d implementation in pytorch correlation mathematically

According to the Wiki
“Description of the process as a convolution in neural networks is by convention. Mathematically it is a cross-correlation rather than a convolution (although cross-correlation is a related operation). This only has significance for the indices in the matrix, and thus which weights are placed at which index.”

Does the code for Conv2d in pytorch rotate the kernel by 180 degrees, i.e. perform convolution or it performs plain cross correlation between input image and kernel?

According to the docs it’s a valid cross-correlation.

3 Likes

Thanks a lot for the prompt reply!