def __init__(self, model, sess, dtypestr="float32", **kwargs): """ Note: the model parameter should be an instance of the cleverhans.model.Model abstraction provided by CleverHans. """ if not isinstance(model, Model): wrapper_warning_logits() model = CallableModelWrapper(model, "logits") super(CarliniWagnerL2, self).__init__(model, sess, dtypestr, **kwargs) self.feedable_kwargs = ("y", "y_target") self.structural_kwargs = [ "batch_size", "confidence", "targeted", "learning_rate", "binary_search_steps", "max_iterations", "abort_early", "initial_const", "clip_min", "clip_max", ]
def __init__(self, model, sess, dtypestr='float32', **kwargs): """ Note: the model parameter should be an instance of the cleverhans.model.Model abstraction provided by CleverHans. """ if not isinstance(model, Model): wrapper_warning_logits() model = CallableModelWrapper(model, 'logits') super(HopSkipJumpAttack, self).__init__(model, sess, dtypestr, **kwargs) self.feedable_kwargs = ('y_target', 'image_target') self.structural_kwargs = [ 'stepsize_search', 'clip_min', 'clip_max', 'constraint', 'num_iterations', 'initial_num_evals', 'max_num_evals', 'batch_size', 'verbose', 'gamma', ]
def __init__(self, models, sess, dtypestr='float32', **kwargs): """ Note: the model parameter should be an instance of the cleverhans.model.Model abstraction provided by CleverHans. """ self.models = [] for model in models: if not isinstance(model, Model): wrapper_warning_logits() model = CallableModelWrapper(model, 'logits') self.models.append(model) # if not isinstance(model, Model): # wrapper_warning_logits() # model = CallableModelWrapper(model, 'logits') super(ElasticNetMethod, self).__init__(model, sess, dtypestr, **kwargs) self.feedable_kwargs = ('y', 'y_target') self.structural_kwargs = [ 'beta', 'decision_rule', 'batch_size', 'confidence', 'targeted', 'learning_rate', 'binary_search_steps', 'max_iterations', 'abort_early', 'initial_const', 'clip_min', 'clip_max', 'rnd', ]
def __init__(self, model, sess, dtypestr="float32", **kwargs): """ Note: the model parameter should be an instance of the cleverhans.model.Model abstraction provided by CleverHans. """ if not isinstance(model, Model): wrapper_warning_logits() model = CallableModelWrapper(model, "logits") super(HopSkipJumpAttack, self).__init__(model, sess, dtypestr, **kwargs) self.feedable_kwargs = ("y_target", "image_target") self.structural_kwargs = [ "stepsize_search", "clip_min", "clip_max", "constraint", "num_iterations", "initial_num_evals", "max_num_evals", "batch_size", "verbose", "gamma", ]
def __init__(self, model, sess, dtypestr='float32', **kwargs): """ Note: the model parameter should be an instance of the cleverhans.model.Model abstraction provided by CleverHans. """ if not isinstance(model, Model): wrapper_warning_logits() model = CallableModelWrapper(model, 'logits') super(CarliniWagnerL2Std, self).__init__(model, sess, dtypestr, **kwargs)
def __init__(self, model, sess, dtypestr='float32', **kwargs): """ Create a DeepFool instance. """ if not isinstance(model, Model): wrapper_warning_logits() model = CallableModelWrapper(model, 'logits') super(DeepFool, self).__init__(model, sess, dtypestr, **kwargs) self.structural_kwargs = [ 'overshoot', 'max_iter', 'clip_max', 'clip_min', 'nb_candidate' ]
def __init__(self, model, sess=None, dtypestr="float32", **kwargs): """ Note: the model parameter should be an instance of the cleverhans.model.Model abstraction provided by CleverHans. """ if not isinstance(model, Model): wrapper_warning_logits() model = CallableModelWrapper(model, "logits") super(VirtualAdversarialMethod, self).__init__(model, sess, dtypestr, **kwargs) self.feedable_kwargs = ("eps", "xi", "clip_min", "clip_max") self.structural_kwargs = ["num_iterations"]
def __init__(self, model, sess, dtypestr='float32', **kwargs): """ Note: the model parameter should be an instance of the cleverhans.model.Model abstraction provided by CleverHans. """ if not isinstance(model, Model): wrapper_warning_logits() model = CallableModelWrapper(model, 'logits') super(CarliniWagnerL2, self).__init__(model, sess, dtypestr, **kwargs) self.feedable_kwargs = ('y', 'y_target') self.structural_kwargs = ['batch_size', 'confidence', 'targeted', 'learning_rate', 'binary_search_steps', 'max_iterations', 'abort_early', 'initial_const', 'clip_min', 'clip_max']
def __init__(self, model, sess, dtypestr="float32", **kwargs): """ Create a DeepFool instance. """ if not isinstance(model, Model): wrapper_warning_logits() model = CallableModelWrapper(model, "logits") super(DeepFool, self).__init__(model, sess, dtypestr, **kwargs) self.structural_kwargs = [ "overshoot", "max_iter", "clip_max", "clip_min", "nb_candidate", ]