class_docstr: This class implements a classifier with the TensorFlow framework.
class_docstr_tok: ["This","class","implements","a","classifier","with","the","TensorFlow","framework","."]
docstr: Use to ensure `TensorFlowClassifier` can be unpickled.
  
  :param state: State dictionary with instance parameters to restore.
docstr_tok: ["Use","to","ensure","`","TensorFlowClassifier","`","can","be","unpickled",".",":","param","state",":","State","dictionary","with","instance","parameters","to","restore","."]
code: def __setstate__(self, state: Dict[str, Any]) -> None:
      """
      Use to ensure `TensorFlowClassifier` can be unpickled.
  
      :param state: State dictionary with instance parameters to restore.
      """
      self.__dict__.update(state)
  
      # Load and update all functionality related to TensorFlow
      # pylint: disable=E0611, E0401
      import tensorflow.compat.v1 as tf
      from tensorflow.python.saved_model import tag_constants
  
      full_path = os.path.join(
          config.ART_DATA_PATH, state["model_name"]
      )
  
      graph = tf.Graph()
      sess = tf.Session(graph=graph)
      loaded = tf.saved_model.loader.load(
          sess, [tag_constants.SERVING], full_path
      )
  
      # Recover session
      self._sess = sess
  
      # Recover input_ph
      input_tensor_name = (
          loaded.signature_def["predict"].inputs["SavedInputPhD"].name
      )
      self._input_ph = graph.get_tensor_by_name(input_tensor_name)
  
      # Recover output layer
      self._output = graph.get_tensor_by_name(state["_output"])
  
      # Recover labels' placeholder if any
      if state["_labels_ph"] is not None:
          self._labels_ph = graph.get_tensor_by_name(
              state["_labels_ph"]
          )
  
      # Recover loss if any
      if state["_loss"] is not None:
          self._loss = graph.get_tensor_by_name(state["_loss"])
  
      # Recover loss_grads if any
      if state["_loss_grads"]:
          self._loss_grads = graph.get_tensor_by_name(
              state["_loss_grads"]
          )
      else:
          self.__dict__.pop("_loss_grads", None)
  
      # Recover learning if any
      if state["_learning"] is not None:
          self._learning = graph.get_tensor_by_name(state["_learning"])
  
      # Recover train if any
      if state["_train"] is not None:
          self._train = graph.get_operation_by_name(state["_train"])
  
      # Recover class_grads if any
      if state["_class_grads"]:
          self._class_grads = [
              ts if ts is None else graph.get_tensor_by_name(ts)
              for ts in state["_class_grads"]
          ]
      else:
          self.__dict__.pop("_class_grads", None)
  
      self.__dict__.pop("model_name", None)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import logging
  import os
  import random
  import shutil
  import time
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union, TYPE_CHECKING
  from tqdm.auto import tqdm
  import numpy
  import six
  from art import config
  from art.estimators.classification.classifier import ClassGradientsMixin, ClassifierMixin
  from art.estimators.tensorflow import TensorFlowEstimator, TensorFlowV2Estimator
  from art.utils import check_and_transform_label_format
label_desc: Use image node_id 22 for calling the TensorFlowClassifier obj's underlying member method code with example usage: obj.__setstate__(state) without return types