From bf1e03721bb84b7390231fe6c16e646edd7a5a76 Mon Sep 17 00:00:00 2001 From: gx_wind Date: Tue, 9 Jan 2018 12:58:44 +0800 Subject: [PATCH] delete comment --- adversarial/advbox/attacks/base.py | 6 +----- adversarial/advbox/attacks/gradientsign.py | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/adversarial/advbox/attacks/base.py b/adversarial/advbox/attacks/base.py index dab1dbbeb0..2058e3cfeb 100644 --- a/adversarial/advbox/attacks/base.py +++ b/adversarial/advbox/attacks/base.py @@ -1,11 +1,7 @@ """ The base model of the model. """ -from abc import ABCMeta -#from advbox.base import Model -import abc - -abstractmethod = abc.abstractmethod +from abc import ABCMeta, abstractmethod class Attack(object): diff --git a/adversarial/advbox/attacks/gradientsign.py b/adversarial/advbox/attacks/gradientsign.py index 37fbdb1132..dff518811e 100644 --- a/adversarial/advbox/attacks/gradientsign.py +++ b/adversarial/advbox/attacks/gradientsign.py @@ -30,9 +30,7 @@ class GradientSignAttack(Attack): gradient_sign.shape) + epsilon * gradient_sign adv_img = np.clip(adv_img, min_, max_) adv_label = np.argmax(self.model.predict([(adv_img, 0)])) - #print("pre_label="+str(pre_label)+ " adv_label="+str(adv_label)) if pre_label != adv_label: - #print(epsilon, pre_label, adv_label) return adv_img -- GitLab