def _attack(self, x_adv: "torch.Tensor", x: "torch.Tensor") -> "torch.Tensor":
        """
        Run attack.

        :param x_batch: A batch of original examples.
        :param y_batch: Not Used.
        :return: A batch of adversarial examples.
        """

        import torch

        x_adv.requires_grad_()
        with torch.enable_grad():
            loss, pixel_weight = self._loss(x_adv)
        grad = torch.autograd.grad(torch.mean(loss), [x_adv])[0]

        with torch.inference_mode():
            x_adv.add_(pixel_weight * torch.sign(grad))
            x_adv.clamp_(x - self.eps, x + self.eps)
            x_adv.clamp_(0.0, 1.0)

        x_adv.requires_grad_(False)
        return x_adv

        Run attack.

        :param x_batch: A batch of original examples.
        :param y_batch: Not Used.
        :return: A batch of adversarial examples.
        
art/attacks/evasion/overload/overload.py