class_docstr: An abstract base class that represents a TensorFlow classifier.
docstr: Initializes a classifier with its specifications.
  
  Args:
      model_spec: Specification for the model.
      label_names: A list of label names for the classes.
      shuffle: Whether the dataset should be shuffled.
docstr_tok: ["Initializes","a","classifier","with","its","specifications",".","Args",":","model_spec",":","Specification","for","the","model",".","label_names",":","A","list","of","label","names","for","the","classes",".","shuffle",":","Whether","the","dataset","should","be","shuffled","."]
code: def __init__(
      self, model_spec: Any, label_names: Sequence[str], shuffle: bool
  ):
      """Initializes a classifier with its specifications.
  
      Args:
          model_spec: Specification for the model.
          label_names: A list of label names for the classes.
          shuffle: Whether the dataset should be shuffled.
      """
      super().__init__(model_spec, shuffle)
      self._label_names = label_names
      self._num_classes = len(label_names)
      self._model: tf.keras.Model = None
      self._optimizer: Union[str, tf.keras.optimizers.Optimizer] = None
      self._loss_function: Union[str, tf.keras.losses.Loss] = None
      self._metric_functions: Sequence[
          Union[str, tf.keras.metrics.Metric]
      ] = None
      self._callbacks: Sequence[tf.keras.callbacks.Callback] = None
      self._hparams: hp.BaseHParams = None
      self._history: tf.keras.callbacks.History = None
  
file_path: mediapipe/mediapipe/model_maker/python/core/tasks/classifier.py
imports: import os
  from typing import Any, Callable, Optional, Sequence, Union
  import tensorflow
  from mediapipe.model_maker.python.core import hyperparameters
  from mediapipe.model_maker.python.core.data import classification_dataset
  from mediapipe.model_maker.python.core.data import dataset
  from mediapipe.model_maker.python.core.tasks import custom_model
  from mediapipe.model_maker.python.core.utils import model_util
label_desc: Use image node_id 1 to create a new Classifier object from inherited base classes: custom_model with example: obj = Classifier(model_spec, label_names, shuffle)