From 9e5a3a086121b2fd1ef8afca41477cf315d08d25 Mon Sep 17 00:00:00 2001 From: guangzhuwu Date: Wed, 7 Feb 2018 17:23:43 +0800 Subject: [PATCH] =?UTF-8?q?Change=20the=20default=20norm=20of=20gradient?= =?UTF-8?q?=20method=20to=20be=20L=E2=88=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fluid/adversarial/advbox/attacks/gradient_method.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fluid/adversarial/advbox/attacks/gradient_method.py b/fluid/adversarial/advbox/attacks/gradient_method.py index 47c1ddff..e7d42c4f 100644 --- a/fluid/adversarial/advbox/attacks/gradient_method.py +++ b/fluid/adversarial/advbox/attacks/gradient_method.py @@ -32,7 +32,7 @@ class GradientMethodAttack(Attack): super(GradientMethodAttack, self).__init__(model) self.support_targeted = support_targeted - def _apply(self, adversary, norm_ord=2, epsilons=0.01, steps=100): + def _apply(self, adversary, norm_ord=np.inf, epsilons=0.01, steps=100): """ Apply the gradient attack method. :param adversary(Adversary): -- GitLab