code: def __init__(
      self,
      nclass,
      backbone,
      aux,
      se_loss,
      dilated=True,
      norm_layer=None,
      base_size=576,
      crop_size=608,
      mean=None,
      std=None,
      root="./pretrain_models",
      multi_grid=False,
      multi_dilation=None,
      **kwargs,
  ):
      if mean is None:
          mean = [0.485, 0.456, 0.406]
      if std is None:
          std = [0.229, 0.224, 0.225]
      super(BaseNet, self).__init__()
      self.nclass = nclass
      self.aux = aux
      self.se_loss = se_loss
      self.mean = mean
      self.std = std
      self.base_size = base_size
      self.crop_size = crop_size
      # copying modules from pretrained models
      if backbone == "resnet50":
          self.pretrained = resnet50(
              pretrained=True,
              dilated=dilated,
              norm_layer=norm_layer,
              root=root,
              multi_grid=multi_grid,
              multi_dilation=multi_dilation,
          )
      elif backbone == "resnet101":
          self.pretrained = resnet101(
              pretrained=True,
              dilated=dilated,
              norm_layer=norm_layer,
              root=root,
              multi_grid=multi_grid,
              multi_dilation=multi_dilation,
          )
      else:
          raise RuntimeError("unknown backbone: {}".format(backbone))
      # bilinear upsample options
      self._up_kwargs = up_kwargs
  
file_path: pywick/pywick/models/segmentation/testnets/tkcnet/base.py
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  from .resnet import *
label_desc: Use image node_id 1 to create a new BaseNet object from inherited base classes: nn with example: obj = BaseNet(nclass, backbone, aux, se_loss, dilated, norm_layer, base_size, crop_size, mean, std, root, multi_grid, multi_dilation)