code: def __init__(
      self, block, layers, in_shape=(3, 256, 256), num_classes=17
  ):
      self.inplanes = 64
  
      super(PyResNet, self).__init__()
      in_channels, height, width = in_shape
  
      # self.conv0 = nn.Sequential(
      #     *make_conv_bn_relu(in_channels, 64, kernel_size=7, stride=2, padding=3, groups=1)
      # )
      self.conv1 = nn.Conv2d(
          in_channels,
          64,
          kernel_size=7,
          stride=2,
          padding=3,
          bias=False,
      )
      self.bn1 = nn.BatchNorm2d(64)
      self.relu = nn.ReLU(inplace=True)
  
      self.layer1 = self.make_layer(block, 64, layers[0])
      self.layer2 = self.make_layer(block, 128, layers[1], stride=2)
      self.layer3 = self.make_layer(block, 256, layers[2], stride=2)
      self.layer4 = self.make_layer(block, 512, layers[3], stride=2)
  
      self.fc2 = nn.Sequential(
          *make_linear_bn_relu(128 * block.expansion, 512),
          nn.Linear(512, num_classes),
      )
      self.fc3 = nn.Sequential(
          *make_linear_bn_relu(256 * block.expansion, 512),
          nn.Linear(512, num_classes),
      )
      self.fc4 = nn.Sequential(
          *make_linear_bn_relu(512 * block.expansion, 512),
          nn.Linear(512, num_classes),
      )
  
      # self.fc = nn.Sequential(
      #     *make_linear_bn_relu((128+256+512) * block.expansion, 1024),
      #     nn.Linear(1024, num_classes)
      # )
      #
  
      for m in self.modules():
          if isinstance(m, nn.Conv2d):
              n = m.kernel_size[0] * m.kernel_size[1] * m.out_channels
              m.weight.data.normal_(0, math.sqrt(2.0 / n))
          elif isinstance(m, nn.BatchNorm2d):
              m.weight.data.fill_(1)
              m.bias.data.zero_()
  
imports: import os
  import math
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new PyResNet object from inherited base classes: nn with example: obj = PyResNet(block, layers, in_shape, num_classes)