f9dd2e3636db61ee1b4d32ee4f494fd9e71adc12,cleverhans/attacks.py,FastGradientMethod,generate_np,#FastGradientMethod#Any#Any#,159

Before Change



        // Run symbolic graph without or with true labels
        if params["Y"] is None:
            X_adv, = batch_eval_com([self.x], [self.default_graph], [X])
        else:
            X_adv, = batch_eval_com([self.x, self.y], [self.default_graph],
                                    [X, params["Y"]])

After Change



        // Generate this attack"s graph if it hasn"t been done previously
        if not hasattr(self, "_x"):
            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)

        // Run symbolic graph without or with true labels
        if params["Y"] is None:
            feed_dict = {self._x: X}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


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: IBM/adversarial-robustness-toolbox
Commit Name: 78604bdd9729e62b290823ad64e0d8de28da477a
Time: 2017-06-08
Author: valentina.zantedeschi@ibm.com
File Name: src/attackers/fast_gradient_unittest.py
Class Name: TestFastGradientMethod
Method Name: test_mnist


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