Tried it out:
self.adv_noise = self.adv_noise.detach().clone().clamp(-eps, eps)

But still same error as before

RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

Also the same error if I change the order:
self.adv_noise = self.adv_noise.clamp(-eps,eps).detach().clone()