DeepRobust icon indicating copy to clipboard operation
DeepRobust copied to clipboard

PGD torch device inconsistency

Open timchenggu123 opened this issue 2 years ago • 1 comments

on this line https://github.com/DSE-MSU/DeepRobust/blob/master/deeprobust/image/defense/pgdtraining.py#L219

adversary = PGD(self.model)

You guys forgot to pass in the self.device parameter, which results in inconsistency between the device in the PGD class and the PGDTraining class. I believe the correct code should be

adversary = PGD(self.model, device=self.device)

Can you guys fix that code? Thanks! :D

timchenggu123 avatar Mar 02 '22 05:03 timchenggu123

find the same error

GumpCode avatar Mar 23 '22 10:03 GumpCode