Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vietvo89 opened this issue Feb 24, 2020 · 0 comments

Comments

@vietvo89
Copy link

Hi NetoPedro

I am trying play around with your code. But I got a bug like below. I do now know why input and weight type are not the same. In your code you did transform twice. Why do you need to do that? How can it be fixed?

Thanks

Traceback (most recent call last):
...
File "./GitHub/Universal-Adversarial-Perturbations-Pytorch/adversarial_perturbation.py", line 86, in generate
r2 = (net(cur_img1).max(1)[1])
...
RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant