fkodom / fft-conv-pytorch

Implementation of 1D, 2D, and 3D FFT convolutions in PyTorch. Much faster than direct convolutions for large kernel sizes.
MIT License
478 stars 58 forks source link

Propagation of error becomes large very fast #4

Closed dwromero closed 3 years ago

dwromero commented 3 years ago

Hi fkodom, I was trying to experiment with your fftconv implementation but I saw that just after 2 layers the error becomes quite large. Is it due to a malinterpretation of your code from my part? Might it be that the FFT + IFFT simply introduce too much error when concatenated?

Thank you in advance for your help! :) David

image

SOLUTION: The problem is that the convolution was growing very largely, for which a difference of 1e-3 was not that big. In short the method works fantastically good :)

fkodom commented 3 years ago

Sorry for the delay here -- was away from work for a few days. Glad you figured it out!