BardOfCodes / universal_pytorch

Pytorch implementation of Universal Adverserial Perturbation and Fast Feature Fool
22 stars 2 forks source link

minor mistake and question #3

Open YanghaoZYH opened 4 years ago

YanghaoZYH commented 4 years ago

Hi, Thanks for your contribution. For line 335 in utils.py, https://github.com/BardOfCodes/universal_pytorch/blob/6ae4dbb9795026a895b187063a9d6bd1e2842dd7/utils.py#L335 I believe the code should be params.requires_grad = False

btw, I am wondering why there is no clipping implementation for the perturbed image?
Isn't it necessary to have a the valid range for image data ([0..1] for floats or [0..255] for integers)?