SSIM metric not working with half-precision #6556
Unanswered
ncuxomun
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I am using both MSE and SSIM metrics in one (total) loss function in an AutoEncoder but I am not able to use the half-precision on my GPU because of the error as shown below:

What I understand is that my input X (from the batch) is on Float32 but my pred_X is on Float16 (I think it is due to the half-precision), hence these two are incompatible resulting in error. Interestingly, they are OK when computed in MSE loss, but NOT OK when computed in SSIM loss.
How can I resolve the issue if I want to use half-precision on my GPU?
Thank you for your attention!
Beta Was this translation helpful? Give feedback.
All reactions