f9dd2e3636db61ee1b4d32ee4f494fd9e71adc12,cleverhans/attacks.py,FastGradientMethod,generate_np,#FastGradientMethod#Any#Any#,159
Before Change
X_adv, = batch_eval_com([self.x, self.y], [self.default_graph],
[X, params["Y"]])
return X_adv
class BasicIterativeMethod(Attack):
After Change
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}
else:
feed_dict = {self._x: X, self.y: params["Y"]}
return self.sess.run(self._x_adv, feed_dict=feed_dict)
class BasicIterativeMethod(Attack):
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: 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: IBM/adversarial-robustness-toolbox
Commit Name: 8ef790ad39c9d8beb926bea66bd3f37b74dd15df
Time: 2020-05-20
Author: ebube.chuba@ibm.com
File Name: art/estimators/classification/keras.py
Class Name: KerasClassifier
Method Name: get_activations