The issue tracker should only be used to report bugs or feature requests. If you are looking for support from other library users, please ask a question on StackOverflow.
Describe the bug
I used the PGD method in this folder but I use double precision in my models thus encountered an error while using the attack
cleverhans/cleverhans/torch/attacks/projected_gradient_descent.py
I found a way of fixing the problem:
line 74 in cleverhans/cleverhans/torch/attacks/fast_gradient_method.py
instead of:
x = x.clone().detach().to(torch.float).requires_grad_(True)
I put
x = x.clone().detach().to(x.dtype).requires_grad_(True)
My solution then covers double precision and simple precision