class_docstr: ResNe(x)t_SlowFast backbone.
  Args:
      depth (int): Depth of resnet, from {50, 101, 152}.
      num_stages (int): Resnet stages, normally 4.
      strides (Sequence[int]): Strides of the first block of each stage.
      dilations (Sequence[int]): Dilation of each stage.
      out_indices (Sequence[int]): Output from which stages.
      style (str): `pytorch` or `caffe`. If set to "pytorch", the stride-two
          layer is the 3x3 conv layer, otherwise the stride-two layer is
          the first 1x1 conv layer.
      frozen_stages (int): Stages to be frozen (all param fixed). -1 means
          not freezing any parameters.
      bn_eval (bool): Whether to set BN layers to eval mode, namely, freeze
          running stats (mean and var).
      bn_frozen (bool): Whether to freeze weight and bias of BN layers.
      with_cp (bool): Use checkpoint or not. Using checkpoint will save some
          memory while slowing down the training speed.
class_docstr_tok: ["ResNe","(","x",")","t_SlowFast","backbone",".","Args",":","depth","(","int",")",":","Depth","of","resnet",",","from","{","50",",","101",",","152","}",".","num_stages","(","int",")",":","Resnet","stages",",","normally","4.","strides","(","Sequence","[","int","]",")",":","Strides","of","the","first","block","of","each","stage",".","dilations","(","Sequence","[","int","]",")",":","Dilation","of","each","stage",".","out_indices","(","Sequence","[","int","]",")",":","Output","from","which","stages",".","style","(","str",")",":","`","pytorch","`","or","`","caffe","`",".","If","set","to","``","pytorch","''",",","the","stride-two","layer","is","the","3x3","conv","layer",",","otherwise","the","stride-two","layer","is","the","first","1x1","conv","layer",".","frozen_stages","(","int",")",":","Stages","to","be","frozen","(","all","param","fixed",")",".","-1","means","not","freezing","any","parameters",".","bn_eval","(","bool",")",":","Whether","to","set","BN","layers","to","eval","mode",",","namely",",","freeze","running","stats","(","mean","and","var",")",".","bn_frozen","(","bool",")",":","Whether","to","freeze","weight","and","bias","of","BN","layers",".","with_cp","(","bool",")",":","Use","checkpoint","or","not",".","Using","checkpoint","will","save","some","memory","while","slowing","down","the","training","speed","."]
code: def forward(self, x):
      x = self.conv1(x)
      x = self.bn1(x)
      x = self.relu(x)
      x = self.maxpool(x)
  
      x1 = self.layer1(x)
      x2 = self.layer2(x1)
      x3 = self.layer3(x2)
      x4 = self.layer4(x3)
  
      feat = [x3, x4]
      tpn_feat = self.TPN_neck(feat)
  
      x = self.avg_pool(tpn_feat[0])
      if self.dropout is not None:
          x = self.dropout(x)
      x = x.view(x.size(0), -1)
  
      if self.feat_ext:
          return x
  
      out = self.fc(x)
      return out
  
imports: import numpy
  import torch
  import torch.nn
  import torch.utils.checkpoint
  import torch.nn.functional
label_desc: Use image node_id 3 for calling the TPNet obj's underlying member method code with example usage: obj.forward(x) and returns: out, x