code: def __init__(
      self,
      block,
      layers,
      num_classes=1000,
      dilated=True,
      deep_stem=False,
      zero_init_residual=False,
      norm_layer=nn.BatchNorm2d,
      **kwargs,
  ):
      self.inplanes = 128 if deep_stem else 64
      super(ResNetV1b, self).__init__()
      if deep_stem:
          self.conv1 = nn.Sequential(
              nn.Conv2d(3, 64, 3, 2, 1, bias=False),
              norm_layer(64),
              nn.ReLU(True),
              nn.Conv2d(64, 64, 3, 1, 1, bias=False),
              norm_layer(64),
              nn.ReLU(True),
              nn.Conv2d(64, 128, 3, 1, 1, bias=False),
          )
      else:
          self.conv1 = nn.Conv2d(3, 64, 7, 2, 3, bias=False)
      self.bn1 = norm_layer(self.inplanes)
      self.relu = nn.ReLU(True)
      self.maxpool = nn.MaxPool2d(3, 2, 1)
      self.layer1 = self._make_layer(
          block, 64, layers[0], norm_layer=norm_layer
      )
      self.layer2 = self._make_layer(
          block, 128, layers[1], stride=2, norm_layer=norm_layer
      )
      if dilated:
          self.layer3 = self._make_layer(
              block,
              256,
              layers[2],
              stride=1,
              dilation=2,
              norm_layer=norm_layer,
          )
          self.layer4 = self._make_layer(
              block,
              512,
              layers[3],
              stride=1,
              dilation=4,
              norm_layer=norm_layer,
          )
      else:
          self.layer3 = self._make_layer(
              block, 256, layers[2], stride=2, norm_layer=norm_layer
          )
          self.layer4 = self._make_layer(
              block, 512, layers[3], stride=2, norm_layer=norm_layer
          )
      self.avgpool = nn.AdaptiveAvgPool2d((1, 1))
      self.fc = nn.Linear(512 * block.expansion, num_classes)
  
      for m in self.modules():
          if isinstance(m, nn.Conv2d):
              nn.init.kaiming_normal_(
                  m.weight, mode="fan_out", nonlinearity="relu"
              )
          elif isinstance(m, nn.BatchNorm2d):
              nn.init.constant_(m.weight, 1)
              nn.init.constant_(m.bias, 0)
  
      if zero_init_residual:
          for m in self.modules():
              if isinstance(m, BottleneckV1b):
                  nn.init.constant_(m.bn3.weight, 0)
              elif isinstance(m, BasicBlockV1b):
                  nn.init.constant_(m.bn2.weight, 0)
  
imports: import torch
  import torch.nn
  import torch.utils.model_zoo
label_desc: Use image node_id 1 to create a new ResNetV1b object from inherited base classes: nn with example: obj = ResNetV1b(block, layers, num_classes, dilated, deep_stem, zero_init_residual, norm_layer)