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