You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def forward(self, x, y):
if x.shape[1] == 3:
x = kornia.color.rgb_to_grayscale(x)
if y.shape[1] == 3:
y = kornia.color.rgb_to_grayscale(y)
return 1 - kornia.losses.ssim(x, y, self.window_size, 'mean')
kornia library requires max_val is float instead of str,i.e.,'mean'.
What's wrong with me, please? Or is there a problem with the source code?
My environment is:
kornia 0.5.8
python 3.7.0
pytorch 1.7.0
The text was updated successfully, but these errors were encountered:
I used my mini-dataset. When I ran train.py, I got the error.
Later, I found kornia.losses.ssim() parameter type is not correct in class SSIM.
source code:
class SSIM(nn.Module):
def init(self, window_size=11):
super(SSIM, self).init()
self.window_size = window_size
kornia library requires max_val is float instead of str,i.e.,'mean'.
What's wrong with me, please? Or is there a problem with the source code?
My environment is:
kornia 0.5.8
python 3.7.0
pytorch 1.7.0
The text was updated successfully, but these errors were encountered: