From 1a62ee333cff17432e14a65389f4d85d20aaa389 Mon Sep 17 00:00:00 2001 From: lyzsea Date: Thu, 8 Feb 2018 10:31:26 +0800 Subject: [PATCH] lost return --- fluid/adversarial/advbox/attacks/saliency.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fluid/adversarial/advbox/attacks/saliency.py b/fluid/adversarial/advbox/attacks/saliency.py index 9ec530dd..7922192f 100644 --- a/fluid/adversarial/advbox/attacks/saliency.py +++ b/fluid/adversarial/advbox/attacks/saliency.py @@ -36,7 +36,6 @@ class SaliencyMapAttack(Attack): assert (adversary.target_label is None) or adversary.is_targeted_attack target_labels = [adversary.target_label] - for target in target_labels: original_image = adversary.original @@ -81,6 +80,8 @@ class SaliencyMapAttack(Attack): adv_img = np.clip(adv_img, min_, max_) + return adversary + def _is_zero_mask(self, mask): """ The elements in mask are all zero or not. -- GitLab