using Fourier transforms to do convolution?
<p>According to the <a href="https://en.wikipedia.org/wiki/Convolution_theorem#Convolution_theorem_for_inverse_Fourier_transform" rel="nofollow noreferrer">Convolution theorem</a>, we can convert the Fourier transform operator to convolution.</p>
<p>Using Python and Scipy, my code is below but not correct.
Can you help me and explain it?</p>
<pre><code>import tensorflow as tf
import sys
from scipy import signal

from scipy import linalg
import numpy as np

x = [[1 , 2] , [7 , 8]]

y = [[4 , 5] , [3 , 4]]


print &quot;conv:&quot; ,  signal.convolve2d(x , y , 'full')

new_x = np.fft.fft2(x)
new_y = np.fft.fft2(y)


print &quot;fft:&quot; , np.fft.ifft2(np.dot(new_x , new_y))
</code></pre>
<p>The result of code:</p>
<pre><code>conv: [[ 4 13 10]
 [31 77 48]
 [21 52 32]]

fft: [[  20.+0.j   26.+0.j]
 [ 104.+0.j  134.+0.j]]
</code></pre>
<p>I'm confused!</p>