class_docstr: A unittest class for testing the UniversalPerturbation attack.
class_docstr_tok: ["A","unittest","class","for","testing","the","UniversalPerturbation","attack","."]
code: def test_7_keras_iris_unbounded(self):
      classifier = get_tabular_classifier_kr()
  
      # Recreate a classifier without clip values
      classifier = KerasClassifier(
          model=classifier._model, use_logits=False, channels_first=True
      )
      attack_params = {
          "max_iter": 1,
          "attacker": "newtonfool",
          "attacker_params": {"max_iter": 5, "verbose": False},
      }
      attack = UniversalPerturbation(classifier, verbose=False)
      attack.set_params(**attack_params)
      x_test_iris_adv = attack.generate(self.x_test_iris)
      self.assertFalse((self.x_test_iris == x_test_iris_adv).all())
  
      preds_adv = np.argmax(classifier.predict(x_test_iris_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 universal adversarial examples: %.2f%%",
          (acc * 100),
      )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import numpy
  from art.attacks.evasion.universal_perturbation import UniversalPerturbation
  from art.estimators.classification.classifier import ClassifierMixin
  from art.estimators.classification.keras import KerasClassifier
  from art.estimators.estimator import BaseEstimator
  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
label_desc: Use image node_id 6 for calling the TestUniversalPerturbation obj's underlying member method code with example usage: obj.test_7_keras_iris_unbounded() without return types