code: def __init__(self):
      super().__init__()
      self.model = resnet18(pretrained=True)
      num_ftrs = self.model.fc.in_features
      # Here the size of each output sample is set to 37.
      self.model.fc = torch.nn.Linear(num_ftrs, 37)
      self.criterion = torch.nn.CrossEntropyLoss()
  
file_path: BigDL/python/nano/tutorial/training/pytorch-lightning/lightning_cv_data_pipeline.py
imports: import torch
  import torchvision
  from typing import Any
  from torch.utils.data.dataloader import DataLoader
  from torchvision.models import resnet18
  from bigdl.nano.pytorch import Trainer
  import pytorch_lightning
  from os.path import split, join, realpath
  import cv2
  from logging import warning
  import os
  from bigdl.nano.pytorch.vision.datasets import OxfordIIITPet
label_desc: Use image node_id 1 to create a new MyLightningModule object from inherited base classes: pl with example: obj = MyLightningModule()