Skip to content

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

@vietvo89

Description

@vietvo89

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions