class_docstr: This wrapper handles torch models for image classification.
  
  It can either support models from torchvision.models (resnet18, alexnet, ...) or a
  simple CNN for MNIST (simple-cnn, see SimpleCnn class).
class_docstr_tok: ["This","wrapper","handles","torch","models","for","image","classification",".","It","can","either","support","models","from","torchvision.models","(","resnet18",",","alexnet",",","...",")","or","a","simple","CNN","for","MNIST","(","simple-cnn",",","see","SimpleCnn","class",")","."]
docstr: Create the model based on self.model_name and store it in self.model.
docstr_tok: ["Create","the","model","based","on","self.model_name","and","store","it","in","self.model","."]
code: def _create_model(self, num_classes) -> None:
      """Create the model based on self.model_name and store it in self.model."""
      if self.model_name == "simple-cnn":
          self.model = SimpleCnn()
      else:
          # Raise error if pretrained model doesn't have 1000 classes.
          pretrained = self.config.get("pretrained", False)
          if pretrained and num_classes != 1000:
              raise ValueError(
                  "Using a pretrained model requires config parameter num_classes "
                  f"to be 1000, is: {num_classes}"
              )
  
          # Create model.
          # TODO: Pass additional kwargs on to model (is this possible?).
          self.model = getattr(torchvision.models, self.model_name)(
              pretrained=pretrained, num_classes=num_classes
          )
  
imports: import comet_ml
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.optim
  from torch.utils.data import DataLoader
  import torchvision
  from ignite.engine import Events, create_supervised_trainer, create_supervised_evaluator
  from ignite.metrics import Accuracy, Loss
  import numpy
  from loguru import logger
  from ..model_wrapper import ModelWrapper
  from .None import preprocessing, visualization
  from ..None import utils
label_desc: Use image node_id 1 for calling the TorchImageClassificationWrapper obj's underlying member method code with example usage: obj._create_model(num_classes) without return types