According to the torch.fft doc, the rfft2 is equivalent to a combination of 'fft()'and ‘rfft()’, but when I apply it to an image, the results of the combination of separable fft mismatch with the rfft2, why?
The docs use assert_close
which compares floating point numbers with a small eps
depending on their dtype
while you are comparing both results for bitwise-identical results, which will easily fail for floating point numbers due to the limited precision and a potentially different order of operations.