Solved by KFrank in post #2 
              
              
                Hi Avitase! 

Pytorch’s fft functions, including ifft(), pad by simply appending zeros 
to the end of the input vector – they don’t insert zeros into the middle. 
You can get the behavior I believe you want by using rfft() / irfft(). 
The following illustrates these two points: 
>>> import torch
>>> …