Example #1
0
    def __init__(self, model, dtypestr="float32"):
        """
        Creates a BasicIterativeMethod instance in eager execution.
        :param model: cleverhans.model.Model
        :param dtypestr: datatype in the string format.
        """
        if not isinstance(model, Model):
            wrapper_warning()
            model = CallableModelWrapper(model, "probs")

        super(BasicIterativeMethod, self).__init__(model, dtypestr)
Example #2
0
    def __init__(self, model, dtypestr="float32", **kwargs):
        """
        Creates a FastGradientMethod instance in eager execution.
        :model: cleverhans.model.Model
        :dtypestr: datatype in the string format.
        """
        del kwargs
        if not isinstance(model, Model):
            wrapper_warning()
            model = CallableModelWrapper(model, "probs")

        super(FastGradientMethod, self).__init__(model, dtypestr)
Example #3
0
    def __init__(self, model, sess, dtypestr='float32', **kwargs):
        if not isinstance(model, Model):
            wrapper_warning()
            model = CallableModelWrapper(model, 'probs')

        super(LBFGS, self).__init__(model, sess, dtypestr, **kwargs)

        self.feedable_kwargs = ('y_target', )
        self.structural_kwargs = [
            'batch_size', 'binary_search_steps', 'max_iterations',
            '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()
      model = CallableModelWrapper(model, 'probs')

    super(LBFGS, self).__init__(model, sess, dtypestr, **kwargs)

    self.feedable_kwargs = ('y_target',)
    self.structural_kwargs = [
        'batch_size', 'binary_search_steps', 'max_iterations',
        'initial_const', 'clip_min', 'clip_max'
    ]
Example #5
0
    def __init__(self, model, sess, dtypestr="float32", **kwargs):
        if not isinstance(model, Model):
            wrapper_warning()
            model = CallableModelWrapper(model, "probs")

        super(LBFGS, self).__init__(model, sess, dtypestr, **kwargs)

        self.feedable_kwargs = ("y_target",)
        self.structural_kwargs = [
            "batch_size",
            "binary_search_steps",
            "max_iterations",
            "initial_const",
            "clip_min",
            "clip_max",
        ]