class_docstr: A unittest class for testing the Carlini L2 attack.
class_docstr_tok: ["A","unittest","class","for","testing","the","Carlini","L2","attack","."]
docstr: Test the corner case when attack is failed.
  :return:
docstr_tok: ["Test","the","corner","case","when","attack","is","failed",".",":","return",":"]
code: def test_tensorflow_failure_attack_L0(self):
      """
      Test the corner case when attack is failed.
      :return:
      """
      # Build TensorFlowClassifier
      tfc, sess = get_image_classifier_tf(from_logits=True)
  
      # Failure attack
      cl0m = CarliniL0Method(
          classifier=tfc,
          targeted=False,
          max_iter=1,
          batch_size=10,
          learning_rate=0.01,
          binary_search_steps=1,
          warm_start=True,
          verbose=False,
      )
      params = {"y": random_targets(self.y_test_mnist, tfc.nb_classes)}
      _ = cl0m.generate(self.x_test_mnist, **params)
      # self.assertLessEqual(np.amax(x_test_adv), 1.0)
      # self.assertGreaterEqual(np.amin(x_test_adv), 0.0)
      # self.assertTrue(np.allclose(self.x_test_mnist, x_test_adv, atol=1e-3))
  
      # Clean-up session
      if sess is not None:
          sess.close()
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import unittest
  import numpy
  from art.attacks.evasion.carlini import CarliniL0Method, CarliniL2Method, CarliniLInfMethod
  from art.estimators.estimator import BaseEstimator
  from art.estimators.classification.classifier import ClassGradientsMixin
  from art.utils import random_targets
  from tests.utils import TestBase, master_seed
  from tests.utils import get_image_classifier_tf
  from tests.utils import get_image_classifier_pt
  from tests.attacks.utils import backend_test_classifier_type_check_fail
label_desc: Use image node_id 11 for calling the TestCarlini obj's underlying member method code with example usage: obj.test_tensorflow_failure_attack_L0() without return types