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

Before Change


            assert self.y is not None, error

        // 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

After Change


            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: 3

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: mil-tokyo/webdnn
Commit Name: b43dab139aeb1a0895437c0120b911d713f3df86
Time: 2017-04-11
Author: hidaka@mi.t.u-tokyo.ac.jp
File Name: graph-builder/dnn_kernel_builder_webgpu.py
Class Name: KBLinearLayer
Method Name: generate_kernels


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