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
Traceback (most recent call last):
File "run_model.py", line 143, in <module>
loss_ssim = -ssim_loss(noriginalimage, outputimage)
File "/usr/local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pytorch_ssim/__init__.py", line 57, in forward
return _ssim(img1, img2, window, self.window_size, channel, self.size_average)
File "/usr/local/lib/python3.6/site-packages/pytorch_ssim/__init__.py", line 18, in _ssim
mu1 = F.conv2d(img1, window, padding = window_size//2, groups = channel)
RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same
It is throwing this error. I have to convert both the variables to CPU to run which kills the speed of the computation. Can someone help out in resolving this?
The text was updated successfully, but these errors were encountered:
Can you post the code section where you sent your too inputs to cuda?
Because youa re sending two thing to ssim both as tensors but only one of them is in GPU the other not.
It is throwing this error. I have to convert both the variables to CPU to run which kills the speed of the computation. Can someone help out in resolving this?
The text was updated successfully, but these errors were encountered: