Grad-CAM-Pytorch icon indicating copy to clipboard operation
Grad-CAM-Pytorch copied to clipboard

I met this error when run 6)Train session in GuidedBackprop.ipynb.

Open bemoregt opened this issue 7 years ago • 2 comments

Hi, @GunhoChoi

I met this error when run 6)Train session in GuidedBackprop.ipynb.

RuntimeError: Input type (torch.cuda.DoubleTensor) and weight type (torch.cuda.FloatTensor) should be the same

What's wrong with me?

Thanks in advance.

from @bemoregt.

bemoregt avatar Jun 20 '18 06:06 bemoregt

@bemoregt Try to change the input data type into float like the code below. x = Variable(image.float().cuda())

lazyshuu avatar Apr 03 '20 15:04 lazyshuu

thanks the answer

Snopylz avatar Sep 06 '21 11:09 Snopylz