hello everyone,
So, I implemented the ssim loss with pytorch. it was working one month ago. Now, when I tried to execute the code, it returns that the ssim output is negative and should be at least 0.
the code is:
> !pip install piqa
> from piqa import ssim
> 
> class SSIMLoss(ssim.SSIM):
>     def forward(self, x, y):
>         return 1. - super().forward(x, y)
> criterion_ssim = SSIMLoss().cuda() # .cuda() if you need GPU support