carlini / nn_robust_attacks

Robust evasion attacks against neural network to find adversarial examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

l0 attack can't work correctly

meet-cjli opened this issue · comments

In the function attack_single, after run several steps,

 while True:
            # try to solve given this valid map
            res = self.grad([np.copy(img)], [target], np.copy(prev), 
                       valid, const)
            if res == None:
                # the attack failed, we return this as our final answer
                print("Final answer",equal_count)
                return last_solution

encounter a problem, equal_count not defiened ,and last_solution is None ,Therefore , r.extend(None) also cause a exception