def test_stronger_pgd_targeted_attack_with_adam_optimizer(self): unrolled_optimizer = UnrolledAdam(lr=0.1) self.helper_pgd_attack(unrolled_optimizer=unrolled_optimizer, targeted=True, epsilon=5., nb_iters=100, clip_min=-10., clip_max=10., assert_threshold=0.9)
def test_pgd_untargeted_attack_with_adam_optimizer(self): unrolled_optimizer = UnrolledAdam(lr=0.1) self.helper_pgd_attack(unrolled_optimizer=unrolled_optimizer, targeted=False, epsilon=.5, nb_iters=20, clip_min=-10., clip_max=10., assert_threshold=0.7)