Description
I recently tried to move to GPU backends (cupy) for simulating spectral data when simulating a small number of spectral bands (for large number of bins, I am always running into GPU OOMs).
I spotted a bug in the Identity modality at this line, as contrary to ground_truth, em_rates is never converted to the chosen backend before.
In my fork, I came up with this quick monketypatch:
em_rates = em_rates.sum(Axis.W)
em_rates = em_rates.copy(data=xp.asarray(em_rates.data))
em_image = em_rates * truth
@tlambert03 do you have a better alternative to propose?
Description
I recently tried to move to GPU backends (
cupy) for simulating spectral data when simulating a small number of spectral bands (for large number of bins, I am always running into GPU OOMs).I spotted a bug in the
Identitymodality at this line, as contrary toground_truth,em_ratesis never converted to the chosen backend before.In my fork, I came up with this quick monketypatch:
@tlambert03 do you have a better alternative to propose?