I am trying to use torch.fft with 2D images. The problem is when I use 2D FFT tensors that are not the same exact dimensions of what my network was trained with, they are not in the same ballpark so inference is failing.
When I have normalized set to True, I am getting drastically different results for the same tensor with different dimensions.
For example, both the attached plots were created identically with torch.fft(). The only thing different is the dimension of one input image is 896 and the other 448.
I can change the power of the FFT signal using division/multiplication, but I cannot figure out how to make it so both use the same frequencies - which seems like it must be possible somehow. The smaller image cycles/px is ~double the larger image. When I search for shifting FFT frequency, all the results are about fftshift() which is not what I need as far as I can tell.
Dimensions 448:
tiger4484000×4000 1.72 MB
Dimensions 896:
tiger8962000×2000 3.28 MB