Project DelphiTensors Workshop

Convolution is not correlation

⚠️ A detail that catches almost every reader. True convolution flips the kernel. Correlation does not.

np.correlate(x, k, 'valid') # [-2. -2. -2.] np.convolve(x, k[::-1], 'valid') # [-2. -2. -2.] — the same, with k flipped

What deep learning libraries call “convolution” is actually correlation. It makes no practical difference, because the network learns the kernel — but you should know the names are inconsistent.

For a symmetric kernel the distinction vanishes entirely, which is why it goes unnoticed.