class_docstr: A common LightningModule implementation of a image classifier.
class_docstr_tok: ["A","common","LightningModule","implementation","of","a","image","classifier","."]
docstr: A training step of a ImageClassifier.
docstr_tok: ["A","training","step","of","a","ImageClassifier","."]
code: def training_step(self, batch, batch_idx):
      """A training step of a ImageClassifier."""
      x, y = batch
      output = self.model(x)
      loss = self.criterion(output, y)
      self.log("train_loss", loss)
      return loss
  
file_path: BigDL/python/nano/src/bigdl/nano/pytorch/vision/models/classifier.py
imports: from typing import Callable
  import pytorch_lightning
  import torch
  import torch.nn
  from ._utils import BackboneModule
label_desc: Use image node_id 3 for calling the ImageClassifier obj's underlying member method code with example usage: obj.training_step(batch, batch_idx) and returns: loss