class_docstr: This class implements a classifier with the TensorFlow framework.
class_docstr_tok: ["This","class","implements","a","classifier","with","the","TensorFlow","framework","."]
docstr: Return the hidden layers in the model, if applicable.
  
  :return: The hidden layers in the model, input and output layers excluded.
docstr_tok: ["Return","the","hidden","layers","in","the","model",",","if","applicable",".",":","return",":","The","hidden","layers","in","the","model",",","input","and","output","layers","excluded","."]
code: def _get_layers(self) -> List[str]:
      """
      Return the hidden layers in the model, if applicable.
  
      :return: The hidden layers in the model, input and output layers excluded.
      """
      # pylint: disable=E0401
      import tensorflow.compat.v1 as tf
  
      # Get the computational graph
      with self._sess.graph.as_default():
          graph = tf.get_default_graph()
  
      # Get the list of operators and heuristically filter them
      tmp_list = []
      ops = graph.get_operations()
  
      # pylint: disable=R1702
      for op in ops:
          if op.values():
              if op.values()[0].get_shape() is not None:
                  if op.values()[0].get_shape().ndims is not None:
                      if len(op.values()[0].get_shape().as_list()) > 1:
                          if (
                              op.values()[0].get_shape().as_list()[0]
                              is None
                          ):
                              if (
                                  op.values()[0]
                                  .get_shape()
                                  .as_list()[1]
                                  is not None
                              ):
                                  if not op.values()[0].name.startswith(
                                      "gradients"
                                  ):
                                      if not op.values()[
                                          0
                                      ].name.startswith(
                                          "softmax_cross_entropy_loss"
                                      ):
                                          if (
                                              not op.type
                                              == "Placeholder"
                                          ):
                                              tmp_list.append(
                                                  op.values()[0].name
                                              )
  
      # Shorten the list
      if not tmp_list:
          return tmp_list
  
      result = [tmp_list[-1]]
      for name in reversed(tmp_list[:-1]):
          if result[0].split("/")[0] != name.split("/")[0]:
              result = [name] + result
      logger.info(
          "Inferred %i hidden layers on TensorFlow classifier.",
          len(result),
      )
  
      return result
  
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 18 for calling the TensorFlowClassifier obj's underlying member method code with example usage: obj._get_layers() and returns: result, tmp_list