def poison_func_3(self, x): return np.expand_dims( insert_image( x.squeeze(3), backdoor_path=self.backdoor_path, size=(5, 5), random=False, x_shift=3, y_shift=3 ), axis=3, )
def poison_func_3(self, x): return insert_image(x, backdoor_path=self.backdoor_path, size=(5, 5), random=False, x_shift=3, y_shift=3)
def mod(x): return perturbations.insert_image( x, backdoor_path=backdoor_path, size=size, mode=mode, x_shift=x_shift, y_shift=y_shift, channels_first=channels_first, blend=blend, random=False, )
def poison_func_6(self, x): return np.expand_dims(insert_image(x, backdoor_path=self.backdoor_path, random=True, size=(100, 100)), axis=3)
def poison_func_4(self, x): return np.expand_dims(insert_image(x.squeeze(3), backdoor_path=self.backdoor_path, size=(5, 5), random=True), axis=3)
def mod(x): return perturbations.insert_image(x, backdoor_path=backdoor_path, size=size)
def poison_func_6(self, x): return insert_image(x, backdoor_path=self.backdoor_path, random=True, size=(100, 100))
def poison_func_4(self, x): return insert_image(x, backdoor_path=self.backdoor_path, size=(5, 5), random=True)