bat.attacks.base_attack
1class BaseAttack(): 2 def __init__(self, classifier): 3 """ 4 Initialize the attack. 5 :param classifier: model to attack 6 """ 7 self.classifier = classifier 8 self.classifier.n_targets = 0 9 10 def init(self, x): 11 raise NotImplementedError 12 13 def step(self): 14 raise NotImplementedError 15 16 def batch(self): 17 raise NotImplementedError 18 19 def attack(self): 20 raise NotImplementedError
class
BaseAttack:
2class BaseAttack(): 3 def __init__(self, classifier): 4 """ 5 Initialize the attack. 6 :param classifier: model to attack 7 """ 8 self.classifier = classifier 9 self.classifier.n_targets = 0 10 11 def init(self, x): 12 raise NotImplementedError 13 14 def step(self): 15 raise NotImplementedError 16 17 def batch(self): 18 raise NotImplementedError 19 20 def attack(self): 21 raise NotImplementedError