code: def __init__(self, resnet, filters, strides, layers=None):
      if layers is None:
          layers = [1, 2, 3, 4]
      super().__init__(filters, strides, layers)
  
      self.layer0 = nn.Sequential(
          OrderedDict(
              [
                  ("conv0", resnet.conv1),
                  ("bn0", resnet.bn1),
                  ("act0", resnet.relu),
              ]
          )
      )
      self.maxpool = resnet.maxpool
  
      self.layer1 = resnet.layer1
      self.layer2 = resnet.layer2
      self.layer3 = resnet.layer3
      self.layer4 = resnet.layer4
  
imports: from collections import OrderedDict
  from torch import nn
  from torchvision.models import resnet50, resnet34, resnet18, resnet101, resnet152
  from .common import EncoderModule, _take, make_n_channel_input
label_desc: Use image node_id 1 to create a new ResnetEncoder object from inherited base classes: EncoderModule with example: obj = ResnetEncoder(resnet, filters, strides, layers)