class_docstr: ResNet implementation.
  
  [1] Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
  Deep Residual Learning for Image Recognition. arXiv:1512.03385
  
  Attributes:
      block:
          ResNet building block type.
      layers:
          List of blocks per layer.
      num_classes:
          Number of classes in final softmax layer.
      width:
          Multiplier for ResNet width.
class_docstr_tok: ["ResNet","implementation",".","[","1","]","Kaiming","He",",","Xiangyu","Zhang",",","Shaoqing","Ren",",","Jian","Sun","Deep","Residual","Learning","for","Image","Recognition",".","arXiv:1512.03385","Attributes",":","block",":","ResNet","building","block","type",".","layers",":","List","of","blocks","per","layer",".","num_classes",":","Number","of","classes","in","final","softmax","layer",".","width",":","Multiplier","for","ResNet","width","."]
code: def __init__(
      self,
      block: type[BasicBlock] = BasicBlock,
      layers: List[int] = [2, 2, 2, 2],
      num_classes: int = 10,
      width: float = 1.0,
      num_splits: int = 0,
  ):
      super(ResNet, self).__init__()
      self.in_planes = int(64 * width)
  
      self.base = int(64 * width)
  
      self.conv1 = nn.Conv2d(
          3, self.base, kernel_size=3, stride=1, padding=1, bias=False
      )
      self.bn1 = get_norm_layer(self.base, num_splits)
      self.layer1 = self._make_layer(
          block, self.base, layers[0], stride=1, num_splits=num_splits
      )
      self.layer2 = self._make_layer(
          block,
          self.base * 2,
          layers[1],
          stride=2,
          num_splits=num_splits,
      )
      self.layer3 = self._make_layer(
          block,
          self.base * 4,
          layers[2],
          stride=2,
          num_splits=num_splits,
      )
      self.layer4 = self._make_layer(
          block,
          self.base * 8,
          layers[3],
          stride=2,
          num_splits=num_splits,
      )
      self.linear = nn.Linear(
          self.base * 8 * block.expansion, num_classes
      )
  
imports: from __future__ import annotations
  from typing import List
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from lightly.models.batchnorm import get_norm_layer
label_desc: Use image node_id 1 to create a new ResNet object from inherited base classes: nn with example: obj = ResNet(block, layers, num_classes, width, num_splits)