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

Before Change


        
        if self.default_graph is None:
            error_string = "The attack symbolic graph was not generated."
            raise Exception(error_string)
        if self.nb_calls_generate > 1:
            warnings.warn("Attack was generated symbolically multiple "
                          "times, using graph defined by first call.")

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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

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: tensorlayer/tensorlayer
Commit Name: b1dae602081efc6742f28134bdf0be6c87b9e918
Time: 2018-03-26
Author: dhsig552@163.com
File Name: tensorlayer/layers/core.py
Class Name: Layer
Method Name: __init__


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 8b8400882e2e89e0efbd19ee7d1f3cc9a56ff351
Time: 2020-02-28
Author: 11652964@qq.com
File Name: QUANTAXIS/QAFetch/QAhuobi.py
Class Name:
Method Name: QA_fetch_huobi_kline_subscription