class_docstr: Torch Estimator implementation for Image Classification.
  
  Parameters
  ----------
  config : dict
      Config in nested dict.
  logger : logging.Logger
      Optional logger for this estimator, can be `None` when default setting is used.
  reporter : callable
      The reporter for metric checkpointing.
  net : torch.nn.Module
      The custom network. If defined, the model name in config will be ignored so your
      custom network will be used for training rather than pulling it from model zoo.
code: def __init__(
      self,
      config,
      logger=None,
      reporter=None,
      net=None,
      optimizer=None,
      problem_type=None,
  ):
      super().__init__(
          config, logger=logger, reporter=reporter, name=None
      )
      if problem_type is None:
          problem_type = MULTICLASS
      self._problem_type = problem_type
      self._feature_net = None
      self._custom_net = False
  
      self._img_cls_cfg = self._cfg.img_cls
      self._data_cfg = self._cfg.data
      self._optimizer_cfg = self._cfg.optimizer
      self._train_cfg = self._cfg.train
      self._augmentation_cfg = self._cfg.augmentation
      self._model_ema_cfg = self._cfg.model_ema
      self._misc_cfg = self._cfg.misc
  
      # resolve AMP arguments based on PyTorch / Apex availability
      self.use_amp = None
      if self._misc_cfg.amp:
          # `amp` chooses native amp before apex (APEX ver not actively maintained)
          if self._misc_cfg.native_amp and has_native_amp:
              self.use_amp = "native"
          elif self._misc_cfg.apex_amp and has_apex:
              self.use_amp = "apex"
          elif self._misc_cfg.apex_amp or self._misc_cfg.native_amp:
              self._logger.warning(
                  f"Neither APEX or native Torch AMP is available, using float32. \
                                         Install NVIDA apex or upgrade to PyTorch 1.6"
              )
      # FIXME: will provided model conflict with config provided?
      if net is not None:
          assert isinstance(
              net, nn.Module
          ), f"given custom network {type(net)}, `torch.nn` expected"
          try:
              net.to("cpu")
              self._custom_net = True
          except ValueError:
              pass
      self.net = net
      if optimizer is not None:
          self._logger.warning(
              "Custom optimizer object not supported. Will follow the config instead."
          )
      self._optimizer = None
  
imports: import math
  import copy
  import os
  import logging
  import time
  import warnings
  import pickle
  from contextlib import suppress
  from PIL import Image
  import pandas
  import numpy
  import torch
  import torch.nn
  import torchvision.utils
  from torch.optim.optimizer import Optimizer
  from timm.data import create_loader, Mixup, FastCollateMixup, AugMixDataset
  from timm.models import create_model, safe_model_name, convert_splitbn_model, model_parameters
  from timm.utils import random_seed, dispatch_clip_grad, accuracy, unwrap_model, get_state_dict
  from timm.optim import create_optimizer_v2
  from timm.utils import ApexScaler, NativeScaler, ModelEmaV2, AverageMeter
  from timm.loss import LabelSmoothingCrossEntropy, SoftTargetCrossEntropy
  from .default import TorchImageClassificationCfg
  from .utils import resolve_data_config, update_cfg, optimizer_kwargs, create_scheduler, rmse, create_optimizer_v2a
  from ..constants import BINARY, MULTICLASS, REGRESSION
  from ..utils import EarlyStopperOnPlateau
  from ..utils import _suggest_load_context
  from ..conf import _BEST_CHECKPOINT_FILE
  from ..base_estimator import BaseEstimator, set_default
label_desc: Use image node_id 1 to create a new TorchImageClassificationEstimator object from inherited base classes: BaseEstimator with example: obj = TorchImageClassificationEstimator(config, logger, reporter, net, optimizer, problem_type)