Skip to content

Conversation

@ZhangYuef
Copy link

To fix the error of running gen_attack with a GPU. Before fix the error report is as:

File "/advertorch-master/advertorch/attacks/blackbox/gen_attack.py", line 357, in perturb
elite_adv, _, _ = gen_attack(
File "/advertorch-master/advertorch/attacks/blackbox/gen_attack.py", line 221, in gen_attack
pop_t = eps[:, None, None] * pop_t
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!

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

Successfully merging this pull request may close these issues.

1 participant