f9dd2e3636db61ee1b4d32ee4f494fd9e71adc12,cleverhans/attacks.py,Attack,generate_np,#Attack#Any#Any#,57

Before Change


                          "times, using graph defined by first call.")

        // Define batch_eval function common to both backends
        eval_params = {"batch_size": params["batch_size"]}
        if self.back == "tf":
            from .utils_tf import batch_eval

            def batch_eval_com(in_sym, out_sym, inputs):

After Change


        import tensorflow as tf

        // Generate this attack"s graph if it hasn"t been done previously
        if not hasattr(self, "_x") and not hasattr(self, "_x_adv"):
            input_shape = list(X.shape)
            input_shape[0] = None
            self._x = tf.placeholder(tf.float32, shape=input_shape)
            self._x_adv = self.generate(self._x)

        // This indicates loop calls between generate and generate_np
        if hasattr(self, "_x") and not hasattr(self, "_x_adv"):
            error_string = "No symbolic or numeric implementation of attack."
            raise NotImplementedError(error_string)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: tensorflow/cleverhans
Commit Name: f9dd2e3636db61ee1b4d32ee4f494fd9e71adc12
Time: 2017-03-29
Author: ngp5056@cse.psu.edu
File Name: cleverhans/attacks.py
Class Name: Attack
Method Name: generate_np


Project Name: google/tangent
Commit Name: 6b4a4f5c435d53d072055942872dd742248c6b1a
Time: 2017-11-08
Author: mdan@google.com
File Name: tangent/utils.py
Class Name:
Method Name:


Project Name: tensorflow/cleverhans
Commit Name: f9dd2e3636db61ee1b4d32ee4f494fd9e71adc12
Time: 2017-03-29
Author: ngp5056@cse.psu.edu
File Name: cleverhans/attacks.py
Class Name: FastGradientMethod
Method Name: generate_np


Project Name: google/tangent
Commit Name: 088da65939f97dff12f67db313c3601da925b1bf
Time: 2017-11-29
Author: mdan@google.com
File Name: tangent/utils.py
Class Name:
Method Name: