code: def test_2_tensorflow_iris(self):
      classifier, _ = get_tabular_classifier_tf()
  
      # Test untargeted attack
      attack = ProjectedGradientDescent(
          classifier, eps=1.0, eps_step=0.1, max_iter=5, verbose=False
      )
      x_test_adv = attack.generate(self.x_test_iris)
      self.assertFalse((self.x_test_iris == x_test_adv).all())
      self.assertTrue((x_test_adv <= 1).all())
      self.assertTrue((x_test_adv >= 0).all())
  
      preds_adv = np.argmax(classifier.predict(x_test_adv), axis=1)
      self.assertFalse(
          (np.argmax(self.y_test_iris, axis=1) == preds_adv).all()
      )
      acc = (
          np.sum(preds_adv == np.argmax(self.y_test_iris, axis=1))
          / self.y_test_iris.shape[0]
      )
      logger.info(
          "Accuracy on Iris with PGD adversarial examples: %.2f%%",
          (acc * 100),
      )
  
      # Test targeted attack
      targets = random_targets(self.y_test_iris, nb_classes=3)
      attack = ProjectedGradientDescent(
          classifier,
          targeted=True,
          eps=1.0,
          eps_step=0.1,
          max_iter=5,
          verbose=False,
      )
      x_test_adv = attack.generate(self.x_test_iris, **{"y": targets})
      self.assertFalse((self.x_test_iris == x_test_adv).all())
      self.assertTrue((x_test_adv <= 1).all())
      self.assertTrue((x_test_adv >= 0).all())
  
      preds_adv = np.argmax(classifier.predict(x_test_adv), axis=1)
      self.assertTrue((np.argmax(targets, axis=1) == preds_adv).any())
      acc = (
          np.sum(preds_adv == np.argmax(targets, axis=1))
          / self.y_test_iris.shape[0]
      )
      logger.info(
          "Success rate of targeted PGD on Iris: %.2f%%", (acc * 100)
      )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import numpy
  import tensorflow
  from art.attacks.evasion.projected_gradient_descent.projected_gradient_descent import ProjectedGradientDescent
  from art.attacks.evasion.projected_gradient_descent.projected_gradient_descent_numpy import ProjectedGradientDescentNumpy, ProjectedGradientDescentCommon
  from art.estimators.classification import KerasClassifier
  from art.estimators.estimator import BaseEstimator, LossGradientsMixin
  from art.utils import get_labels_np_array, random_targets
  from tests.attacks.utils import backend_test_classifier_type_check_fail
  from tests.utils import TestBase, get_image_classifier_kr, get_image_classifier_pt, get_image_classifier_tf, get_tabular_classifier_kr, get_tabular_classifier_pt, get_tabular_classifier_tf, master_seed
label_desc: Use image node_id 10 for calling the TestPGD obj's underlying member method code with example usage: obj.test_2_tensorflow_iris() without return types