I have been getting different results when I generate metacal images one per one, in for loops, or batched altogether. It is not a non-deterministic operation (as checked by working with 1 image twice and getting zero difference), but when I do batched, the results come out close, but different. Just by looking at the values you'd think they are numerical errors, but that creates different results in our analysis comparing autodiff and finite diferences.
I uploaded a notebook here: https://github.com/CosmoStat/autometacal/blob/mcal_auto_finite_test/notebooks/batched_generate_mcal_bug.ipynb
The bug is in how ifftshift works regarding axes, I'm trying to find a solution now.
It was just adding axes=[1,2] at the end of each shift. Proceeding with bugfix.
I have been getting different results when I generate metacal images one per one, in for loops, or batched altogether. It is not a non-deterministic operation (as checked by working with 1 image twice and getting zero difference), but when I do batched, the results come out close, but different. Just by looking at the values you'd think they are numerical errors, but that creates different results in our analysis comparing autodiff and finite diferences. I uploaded a notebook here: https://github.com/CosmoStat/autometacal/blob/mcal_auto_finite_test/notebooks/batched_generate_mcal_bug.ipynb
In essence, given 2 entries, if you do either
or
img0s1[0]
andimg0s2[0]
come out different.Any thoughts, @EiffL?