class_docstr: Semantic Segmentation Module.
  
  This is a basic semantic segmentation module implemented with Lightning.
  It uses CrossEntropyLoss as the default loss function. May be replaced with
  other loss functions as required.
  It is specific to KITTI dataset i.e. dataloaders are for KITTI
  and Normalize transform uses the mean and standard deviation of this dataset.
  It uses the FCN ResNet50 model as an example.
  
  Adam optimizer is used along with Cosine Annealing learning rate scheduler.
  
  >>> dataset_path = os.path.join(".", "Kitti")
  >>> _create_synth_kitti_dataset(dataset_path, image_dims=(1024, 512))
  >>> SegModel(dataset_path)  # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
  SegModel(
    (net): UNet(
      (layers): ModuleList(
        (0): DoubleConv(...)
        (1): Down(...)
        (2): Down(...)
        (3): Up(...)
        (4): Up(...)
        (5): Conv2d(64, 19, kernel_size=(1, 1), stride=(1, 1))
      )
    )
  )
class_docstr_tok: ["Semantic","Segmentation","Module",".","This","is","a","basic","semantic","segmentation","module","implemented","with","Lightning",".","It","uses","CrossEntropyLoss","as","the","default","loss","function",".","May","be","replaced","with","other","loss","functions","as","required",".","It","is","specific","to","KITTI","dataset","i.e",".","dataloaders","are","for","KITTI","and","Normalize","transform","uses","the","mean","and","standard","deviation","of","this","dataset",".","It","uses","the","FCN","ResNet50","model","as","an","example",".","Adam","optimizer","is","used","along","with","Cosine","Annealing","learning","rate","scheduler",".",">",">",">","dataset_path","=","os.path.join","(","``",".","``",",","``","Kitti","''",")",">",">",">","_create_synth_kitti_dataset","(","dataset_path",",","image_dims=","(","1024",",","512",")",")",">",">",">","SegModel","(","dataset_path",")","#","doctest",":","+ELLIPSIS","+NORMALIZE_WHITESPACE","SegModel","(","(","net",")",":","UNet","(","(","layers",")",":","ModuleList","(","(","0",")",":","DoubleConv","(","...",")","(","1",")",":","Down","(","...",")","(","2",")",":","Down","(","...",")","(","3",")",":","Up","(","...",")","(","4",")",":","Up","(","...",")","(","5",")",":","Conv2d","(","64",",","19",",","kernel_size=","(","1",",","1",")",",","stride=","(","1",",","1",")",")",")",")",")"]
code: def forward(self, x):
      return self.net(x)
  
imports: import os
  import random
  from argparse import ArgumentParser, Namespace
  import numpy
  import torch
  import torch.nn.functional
  import torchvision.transforms
  from lightning.pytorch import LightningModule, Trainer, cli_lightning_logo
  from PIL import Image
  from torch import nn
  from torch.utils.data import DataLoader, Dataset
label_desc: Use image node_id 2 for calling the SegModel obj's underlying member method code with example usage: obj.forward(x) and returns: self