code: def __init__(
      self,
      num,
      num_classes=None,
      groups=1,
      width_per_group=64,
      stride_in_1x1=False,
  ):
      self.num = num
      self.block = {
          18: BasicBlock,
          34: BasicBlock,
          50: Bottleneck,
          101: Bottleneck,
          152: Bottleneck,
      }[num]
  
      self.num_blocks = {
          18: [2, 2, 2, 2],
          34: [3, 4, 6, 3],
          50: [3, 4, 6, 3],
          101: [3, 4, 23, 3],
          152: [3, 8, 36, 3],
      }[num]
  
      self.in_planes = 64
  
      self.groups = groups
      self.base_width = width_per_group
      self.conv1 = nn.Conv2d(
          3, 64, kernel_size=7, stride=2, bias=False, padding=3
      )
      self.bn1 = nn.BatchNorm2d(64)
      self.layer1 = self._make_layer(
          self.block,
          64,
          self.num_blocks[0],
          stride=1,
          stride_in_1x1=stride_in_1x1,
      )
      self.layer2 = self._make_layer(
          self.block,
          128,
          self.num_blocks[1],
          stride=2,
          stride_in_1x1=stride_in_1x1,
      )
      self.layer3 = self._make_layer(
          self.block,
          256,
          self.num_blocks[2],
          stride=2,
          stride_in_1x1=stride_in_1x1,
      )
      self.layer4 = self._make_layer(
          self.block,
          512,
          self.num_blocks[3],
          stride=2,
          stride_in_1x1=stride_in_1x1,
      )
      self.fc = (
          nn.Linear(512 * self.block.expansion, num_classes)
          if num_classes is not None
          else None
      )
  
file_path: tinygrad/extra/models/resnet.py
imports: import tinygrad.nn
  from tinygrad.tensor import Tensor
  from tinygrad.nn.state import torch_load
  from tinygrad.helpers import fetch, get_child
label_desc: Use image node_id 1 to create a new ResNet object  with example: obj = ResNet(num, num_classes, groups, width_per_group, stride_in_1x1)