code: def __init__(
      self,
      backbone="resnet50",
      pretrained_base=True,
      dilated=True,
      **kwargs,
  ):
      super(ResNetBackbone, self).__init__()
  
      if backbone == "resnet34":
          pretrained = resnet34_v1b(
              pretrained=pretrained_base, dilated=dilated, **kwargs
          )
      elif backbone == "resnet50":
          pretrained = resnet50_v1s(
              pretrained=pretrained_base, dilated=dilated, **kwargs
          )
      elif backbone == "resnet101":
          pretrained = resnet101_v1s(
              pretrained=pretrained_base, dilated=dilated, **kwargs
          )
      elif backbone == "resnet152":
          pretrained = resnet152_v1s(
              pretrained=pretrained_base, dilated=dilated, **kwargs
          )
      else:
          raise RuntimeError(f"unknown backbone: {backbone}")
  
      self.conv1 = pretrained.conv1
      self.bn1 = pretrained.bn1
      self.relu = pretrained.relu
      self.maxpool = pretrained.maxpool
      self.layer1 = pretrained.layer1
      self.layer2 = pretrained.layer2
      self.layer3 = pretrained.layer3
      self.layer4 = pretrained.layer4
  
file_path: carefree-learn/cflearn/api/cv/third_party/iharm/model/modeling/resnet.py
imports: import torch
  from .resnetv1b import resnet34_v1b
  from .resnetv1b import resnet50_v1s
  from .resnetv1b import resnet101_v1s
  from .resnetv1b import resnet152_v1s
label_desc: Use image node_id 1 to create a new ResNetBackbone object from inherited base classes: torch.nn with example: obj = ResNetBackbone(backbone, pretrained_base, dilated)