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.
  >>> from pl_examples import _DATASETS_PATH
  >>> dataset_path = os.path.join(_DATASETS_PATH, "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",".",">",">",">","from","pl_examples","import","_DATASETS_PATH",">",">",">","dataset_path","=","os.path.join","(","_DATASETS_PATH",",","``","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 add_model_specific_args(parent_parser):  # pragma: no-cover
      parser = parent_parser.add_argument_group("SegModel")
      parser.add_argument(
          "--data_path", type=str, help="path where dataset is stored"
      )
      parser.add_argument(
          "--batch_size",
          type=int,
          default=16,
          help="size of the batches",
      )
      parser.add_argument(
          "--lr", type=float, default=0.001, help="adam: learning rate"
      )
      parser.add_argument(
          "--num_layers",
          type=int,
          default=5,
          help="number of layers on u-net",
      )
      parser.add_argument(
          "--features_start",
          type=float,
          default=64,
          help="number of features in first layer",
      )
      parser.add_argument(
          "--bilinear",
          action="store_true",
          default=False,
          help="whether to use bilinear interpolation or transposed",
      )
      return parent_parser
  
imports: import os
  import random
  from argparse import ArgumentParser, Namespace
  import numpy
  import torch
  import torch.nn.functional
  from bigdl.nano.pytorch.vision.transforms import transforms
  from PIL import Image
  from torch.utils.data import DataLoader, Dataset
  from typing import Union
  import pytorch_lightning
  from pl_examples import cli_lightning_logo
  from pl_examples.domain_templates.unet import UNet
  from pytorch_lightning.utilities.argparse import from_argparse_args
  from bigdl.nano.pytorch import Trainer
label_desc: Use image node_id 9 for calling the SegModel obj's underlying member method code with example usage: obj.add_model_specific_args(parent_parser) and returns: parent_parser