class_docstr: AutoKeras image classification class.
  
  # Arguments
      num_classes: Int. Defaults to None. If None, it will be inferred from
          the data.
      multi_label: Boolean. Defaults to False.
      loss: A Keras loss function. Defaults to use 'binary_crossentropy' or
          'categorical_crossentropy' based on the number of classes.
      metrics: A list of Keras metrics. Defaults to use 'accuracy'.
      project_name: String. The name of the AutoModel.
          Defaults to 'image_classifier'.
      max_trials: Int. The maximum number of different Keras Models to try.
          The search may finish before reaching the max_trials. Defaults to
          100.
      directory: String. The path to a directory for storing the search
          outputs.  Defaults to None, which would create a folder with the
          name of the AutoModel in the current directory.
      objective: String. Name of model metric to minimize
          or maximize, e.g. 'val_accuracy'. Defaults to 'val_loss'.
      tuner: String or subclass of AutoTuner. If string, it should be one of
          'greedy', 'bayesian', 'hyperband' or 'random'. It can also be a
          subclass of AutoTuner. If left unspecified, it uses a task specific
          tuner, which first evaluates the most commonly used models for the
          task before exploring other models.
      overwrite: Boolean. Defaults to `False`. If `False`, reloads an existing
          project of the same name if one is found. Otherwise, overwrites the
          project.
      seed: Int. Random seed.
      max_model_size: Int. Maximum number of scalars in the parameters of a
          model. Models larger than this are rejected.
      **kwargs: Any arguments supported by AutoModel.
class_docstr_tok: ["AutoKeras","image","classification","class",".","#","Arguments","num_classes",":","Int",".","Defaults","to","None",".","If","None",",","it","will","be","inferred","from","the","data",".","multi_label",":","Boolean",".","Defaults","to","False",".","loss",":","A","Keras","loss","function",".","Defaults","to","use","'binary_crossentropy","'","or","'categorical_crossentropy","'","based","on","the","number","of","classes",".","metrics",":","A","list","of","Keras","metrics",".","Defaults","to","use","'accuracy","'",".","project_name",":","String",".","The","name","of","the","AutoModel",".","Defaults","to","'image_classifier","'",".","max_trials",":","Int",".","The","maximum","number","of","different","Keras","Models","to","try",".","The","search","may","finish","before","reaching","the","max_trials",".","Defaults","to","100.","directory",":","String",".","The","path","to","a","directory","for","storing","the","search","outputs",".","Defaults","to","None",",","which","would","create","a","folder","with","the","name","of","the","AutoModel","in","the","current","directory",".","objective",":","String",".","Name","of","model","metric","to","minimize","or","maximize",",","e.g",".","'val_accuracy","'",".","Defaults","to","'val_loss","'",".","tuner",":","String","or","subclass","of","AutoTuner",".","If","string",",","it","should","be","one","of","'greedy","'",",","'bayesian","'",",","'hyperband","'","or","'random","'",".","It","can","also","be","a","subclass","of","AutoTuner",".","If","left","unspecified",",","it","uses","a","task","specific","tuner",",","which","first","evaluates","the","most","commonly","used","models","for","the","task","before","exploring","other","models",".","overwrite",":","Boolean",".","Defaults","to","`","False","`",".","If","`","False","`",",","reloads","an","existing","project","of","the","same","name","if","one","is","found",".","Otherwise",",","overwrites","the","project",".","seed",":","Int",".","Random","seed",".","max_model_size",":","Int",".","Maximum","number","of","scalars","in","the","parameters","of","a","model",".","Models","larger","than","this","are","rejected",".","*","*","kwargs",":","Any","arguments","supported","by","AutoModel","."]
code: def __init__(
      self,
      num_classes: Optional[int] = None,
      multi_label: bool = False,
      loss: types.LossType = None,
      metrics: Optional[types.MetricsType] = None,
      project_name: str = "image_classifier",
      max_trials: int = 100,
      directory: Union[str, Path, None] = None,
      objective: str = "val_loss",
      tuner: Union[str, Type[tuner.AutoTuner]] = None,
      overwrite: bool = False,
      seed: Optional[int] = None,
      max_model_size: Optional[int] = None,
      **kwargs,
  ):
      if tuner is None:
          tuner = task_specific.ImageClassifierTuner
      super().__init__(
          outputs=blocks.ClassificationHead(
              num_classes=num_classes,
              multi_label=multi_label,
              loss=loss,
              metrics=metrics,
          ),
          max_trials=max_trials,
          directory=directory,
          project_name=project_name,
          objective=objective,
          tuner=tuner,
          overwrite=overwrite,
          seed=seed,
          max_model_size=max_model_size,
          **kwargs,
      )
  
imports: from pathlib import Path
  from typing import List
  from typing import Optional
  from typing import Tuple
  from typing import Type
  from typing import Union
  import tensorflow
  from tensorflow import keras
  from autokeras import auto_model
  from autokeras import blocks
  from autokeras import nodes
  from autokeras.engine import tuner
  from autokeras.tuners import greedy
  from autokeras.tuners import task_specific
  from autokeras.utils import types
label_desc: Use image node_id 1 to create a new ImageClassifier object from inherited base classes: SupervisedImagePipeline with example: obj = ImageClassifier(num_classes, multi_label, loss, metrics, project_name, max_trials, directory, objective, tuner, overwrite, seed, max_model_size)