code: def __init__(
      self,
      num_classes,
      pretrained=True,
      model_name=None,
      use_torch_up=False,
      **kwargs,
  ):
      super(DRNSeg, self).__init__()
  
      if model_name == "DRN_C_42":
          model = drn_c_42(pretrained=pretrained, num_classes=1000)
      elif model_name == "DRN_C_58":
          model = drn_c_58(pretrained=pretrained, num_classes=1000)
      elif model_name == "DRN_D_38":
          model = drn_d_38(pretrained=pretrained, num_classes=1000)
      elif model_name == "DRN_D_54":
          model = drn_d_54(pretrained=pretrained, num_classes=1000)
      elif model_name == "DRN_D_105":
          model = drn_d_105(pretrained=pretrained, num_classes=1000)
      else:
          raise Exception(
              "model_name must be supplied to DRNSeg constructor."
          )
  
      self.base = nn.Sequential(*list(model.children())[:-2])
  
      self.seg = nn.Conv2d(
          model.out_dim, num_classes, kernel_size=1, bias=True
      )
      self.softmax = nn.LogSoftmax()
      m = self.seg
      n = m.kernel_size[0] * m.kernel_size[1] * m.out_channels
      m.weight.data.normal_(0, math.sqrt(2.0 / n))
      m.bias.data.zero_()
      self.use_torch_up = use_torch_up
  
      up = nn.ConvTranspose2d(
          num_classes,
          num_classes,
          16,
          stride=8,
          padding=4,
          output_padding=0,
          groups=num_classes,
          bias=False,
      )
      fill_up_weights(up)
      up.weight.requires_grad = False
      self.up = up
  
file_path: pywick/pywick/models/segmentation/drn_seg.py
imports: from .drn import *
  import torch.nn
  import math
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new DRNSeg object from inherited base classes: nn with example: obj = DRNSeg(num_classes, pretrained, model_name, use_torch_up)