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","."]
docstr: Forward pass through ResNet.
  
  Args:
      x:
          Tensor of shape bsz x channels x W x H
  
  Returns:
      Output tensor of shape bsz x num_classes
docstr_tok: ["Forward","pass","through","ResNet",".","Args",":","x",":","Tensor","of","shape","bsz","x","channels","x","W","x","H","Returns",":","Output","tensor","of","shape","bsz","x","num_classes"]
code: def forward(self, x: Tensor) -> Tensor:
      """Forward pass through ResNet.
  
      Args:
          x:
              Tensor of shape bsz x channels x W x H
  
      Returns:
          Output tensor of shape bsz x num_classes
  
      """
      out = F.relu(self.bn1(self.conv1(x)))
      out = self.layer1(out)
      out = self.layer2(out)
      out = self.layer3(out)
      out = self.layer4(out)
      out = F.avg_pool2d(out, 4)
      out = out.view(out.size(0), -1)
      out = self.linear(out)
      return out
  
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 3 for calling the ResNet obj's underlying member method code with example usage: obj.forward(x) and returns: out