docstr: Lightning calls this inside the training loop
  :param batch:
  :return:
docstr_tok: ["Lightning","calls","this","inside","the","training","loop",":","param","batch",":",":","return",":"]
code: def training_step(self, batch, batch_idx):
      """
      Lightning calls this inside the training loop
      :param batch:
      :return:
      """
      # forward pass
      x, y = batch
      y_hat = self(x)
  
      # calculate loss
      loss_val = self.criterion(y_hat, y)
  
      self.log("train_loss", loss_val, prog_bar=True, on_epoch=True)
      return loss_val
  
imports: import copy
  import os
  import warnings
  from argparse import ArgumentParser
  import pytorch_lightning
  import structlog
  from pytorch_lightning import LightningModule
  from pytorch_lightning.loggers import TensorBoardLogger
  from torch import optim
  from torch.nn import CrossEntropyLoss
  from torch.utils.data import DataLoader
  from torchvision.datasets import CIFAR10
  from torchvision.models import vgg16
  from torchvision.transforms import transforms
  from baal.active import ActiveLearningDataset, get_heuristic
  from baal.bayesian.dropout import patch_module
  from baal.utils.pytorch_lightning import ActiveLightningModule, ResetCallback, BaalTrainer, BaaLDataModule
label_desc: Use image node_id 4 for calling the VGG16 obj's underlying member method code with example usage: obj.training_step(batch, batch_idx) and returns: loss_val