class_docstr: ResNet models for video action recognition
  Deep Residual Learning for Image Recognition, CVPR 2016
  https://arxiv.org/abs/1512.03385
  
  Parameters
  ----------
  depth : int, default is 50.
      Depth of ResNet, from {18, 34, 50, 101, 152}.
  num_classes : int
      Number of classes in the training dataset.
  pretrained_base : bool, default is True.
      Load pretrained base network (backbone), the extra layers are randomized.
  feat_ext : bool, default is False.
      Whether to extract features from backbone network or perform a standard network forward.
  partial_bn : bool, default is False.
      Freeze all batch normalization layers during training except the first one.
  dropout_ratio : float, default is 0.5.
      The dropout rate of a dropout layer.
      The larger the value, the more strength to prevent overfitting.
  init_std : float, default is 0.01.
      Standard deviation value when initialize a fully connected layer.
  num_segment : int, default is 1.
      Number of segments used to evenly divide a video.
  num_crop : int, default is 1.
      Number of crops used during training.
  
  Input : a single video frame or N images from N segments when num_segment > 1
  Output : a single predicted action label
code: def forward(self, x):
      bs, ch, tm, h, w = x.shape
      x = x.permute(0, 2, 1, 3, 4)
      x = x.contiguous().view(bs * tm, ch, h, w)
  
      x = self.conv1(x)
      x = self.bn1(x)
      x = self.relu(x)
      x = self.maxpool(x)
  
      x = self.layer1(x)
      x = self.layer2(x)
      x = self.layer3(x)
      x = self.layer4(x)
  
      x = self.avgpool(x)
      x = self.drop(x)
      x = torch.flatten(x, 1)
  
      # segmental consensus
      x = x.view(bs, tm, self.feat_dim)
      x = torch.mean(x, dim=1)
  
      if self.feat_ext:
          return x
  
      x = self.fc(x)
      return x
  
file_path: gluon-cv/gluoncv/torch/model_zoo/action_recognition/actionrec_resnetv1b.py
imports: import torch
  import torch.nn
  import torchvision
label_desc: Use image node_id 2 for calling the ActionRecResNetV1b obj's underlying member method code with example usage: obj.forward(x) and returns: x, x