code: def __init__(self, block, layers, num_classes=10, num_channels=3):
      self.inplanes = 64
      super(ResNet, self).__init__()
      self.num_classes = num_classes
      self.input_size = 224
      self.dimension = 4
      self.conv1 = layer.Conv2d(
          num_channels, 64, 7, stride=2, padding=3, bias=False
      )
      self.bn1 = layer.BatchNorm2d(64)
      self.relu = layer.ReLU()
      self.maxpool = layer.MaxPool2d(kernel_size=3, stride=2, padding=1)
      self.layer1, layers1 = self._make_layer(block, 64, layers[0])
      self.layer2, layers2 = self._make_layer(
          block, 128, layers[1], stride=2
      )
      self.layer3, layers3 = self._make_layer(
          block, 256, layers[2], stride=2
      )
      self.layer4, layers4 = self._make_layer(
          block, 512, layers[3], stride=2
      )
      self.avgpool = layer.AvgPool2d(7, stride=1)
      self.flatten = layer.Flatten()
      self.fc = layer.Linear(num_classes)
      self.softmax_cross_entropy = layer.SoftMaxCrossEntropy()
  
      self.register_layers(*layers1, *layers2, *layers3, *layers4)
  
imports: from singa import layer
  from singa import model
label_desc: Use image node_id 1 to create a new ResNet object from inherited base classes: model with example: obj = ResNet(block, layers, num_classes, num_channels)