class_docstr: This class implements a classifier with the TensorFlow framework.
class_docstr_tok: ["This","class","implements","a","classifier","with","the","TensorFlow","framework","."]
docstr: Fit the classifier using the generator that yields batches as specified.
  
  :param generator: Batch generator providing `(x, y)` for each epoch. If the generator can be used for native
                    training in TensorFlow, it will.
  :param nb_epochs: Number of epochs to use for training.
  :param verbose: Display the training progress bar.
  :param kwargs: Dictionary of framework-specific arguments. This parameter is not currently supported for
         TensorFlow and providing it takes no effect.
docstr_tok: ["Fit","the","classifier","using","the","generator","that","yields","batches","as","specified",".",":","param","generator",":","Batch","generator","providing","`","(","x",",","y",")","`","for","each","epoch",".","If","the","generator","can","be","used","for","native","training","in","TensorFlow",",","it","will",".",":","param","nb_epochs",":","Number","of","epochs","to","use","for","training",".",":","param","verbose",":","Display","the","training","progress","bar",".",":","param","kwargs",":","Dictionary","of","framework-specific","arguments",".","This","parameter","is","not","currently","supported","for","TensorFlow","and","providing","it","takes","no","effect","."]
code: def fit_generator(  # pylint: disable=W0221
      self,
      generator: "DataGenerator",
      nb_epochs: int = 20,
      verbose: bool = False,
      **kwargs,
  ) -> None:
      """
      Fit the classifier using the generator that yields batches as specified.
  
      :param generator: Batch generator providing `(x, y)` for each epoch. If the generator can be used for native
                        training in TensorFlow, it will.
      :param nb_epochs: Number of epochs to use for training.
      :param verbose: Display the training progress bar.
      :param kwargs: Dictionary of framework-specific arguments. This parameter is not currently supported for
             TensorFlow and providing it takes no effect.
      """
      from art.data_generators import TensorFlowDataGenerator
  
      if self.learning is not None:
          self.feed_dict[self.learning] = True
  
      # Train directly in TensorFlow
      from art.preprocessing.standardisation_mean_std.numpy import (
          StandardisationMeanStd,
      )
  
      if isinstance(generator, TensorFlowDataGenerator) and (
          self.preprocessing is None
          or (
              isinstance(self.preprocessing, StandardisationMeanStd)
              and (
                  self.preprocessing.mean,
                  self.preprocessing.std,
              )
              == (0, 1)
          )
      ):
          for _ in tqdm(
              range(nb_epochs), disable=not verbose, desc="Epochs"
          ):
              gen_size = generator.size
              if isinstance(gen_size, int):
                  num_batches = int(gen_size / generator.batch_size)
              else:
                  raise ValueError(
                      "Number of batches could not be determined from the generator"
                  )
  
              for _ in range(num_batches):
                  i_batch, o_batch = generator.get_batch()
  
                  if self._reduce_labels:
                      o_batch = np.argmax(o_batch, axis=1)
  
                  # Create feed_dict
                  feed_dict = {
                      self.input_ph: i_batch,
                      self.labels_ph: o_batch,
                  }
                  feed_dict.update(self.feed_dict)
  
                  # Run train step
                  self._sess.run(self.train, feed_dict=feed_dict)
      else:
          super().fit_generator(
              generator, nb_epochs=nb_epochs, **kwargs
          )
  
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 12 for calling the TensorFlowClassifier obj's underlying member method code with example usage: obj.fit_generator(generator, nb_epochs, verbose) without return types