Closed aminullah6264 closed 2 years ago
solved by the following change in attack.py file
# self.device = next(model.parameters()).device
self.device = 'cuda'
self.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
This can be work, but I worried about the case you use more than 1 GPUs.
Hi Harry
I just tried with the demo code, however it pop up the following error.
torchattacks/attack.py", line 26, in init self.device = next(model.parameters()).device StopIteration: