https://github.com/Jeffkang-94/pytorch-adversarial-attack/blob/3b5877b3fd30524ccf9318e005b5b6cef3453652/attack/mifgsm.py#L32 The right code should be as following: ```python if self.target is None: cost = -F.cross_entropy(logit, y) else: cost = F.cross_entropy(logit, self.target) ```