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 __init__(
      self,
      depth,
      num_classes,
      pretrained_base=True,
      dropout_ratio=0.5,
      init_std=0.01,
      num_segment=1,
      num_crop=1,
      feat_ext=False,
      partial_bn=False,
      **kwargs,
  ):
      super(ActionRecResNetV1b, self).__init__()
  
      self.depth = depth
      self.num_classes = num_classes
      self.pretrained_base = pretrained_base
      self.feat_ext = feat_ext
  
      if self.depth == 18:
          C2D = torchvision.models.resnet18(
              pretrained=self.pretrained_base, progress=True
          )
          self.expansion = 1
      elif self.depth == 34:
          C2D = torchvision.models.resnet34(
              pretrained=self.pretrained_base, progress=True
          )
          self.expansion = 1
      elif self.depth == 50:
          C2D = torchvision.models.resnet50(
              pretrained=self.pretrained_base, progress=True
          )
          self.expansion = 4
      elif self.depth == 101:
          C2D = torchvision.models.resnet101(
              pretrained=self.pretrained_base, progress=True
          )
          self.expansion = 4
      elif self.depth == 152:
          C2D = torchvision.models.resnet152(
              pretrained=self.pretrained_base, progress=True
          )
          self.expansion = 4
      else:
          raise RuntimeError(
              "We do not support ResNet with depth %d." % (self.depth)
          )
  
      self.dropout_ratio = dropout_ratio
      self.init_std = init_std
      self.num_segment = num_segment
      self.num_crop = num_crop
      self.feat_dim = 512 * self.expansion
  
      self.conv1 = C2D.conv1
      self.bn1 = C2D.bn1
      self.relu = C2D.relu
      self.maxpool = C2D.maxpool
      self.layer1 = C2D.layer1
      self.layer2 = C2D.layer2
      self.layer3 = C2D.layer3
      self.layer4 = C2D.layer4
      self.avgpool = C2D.avgpool
  
      self.drop = nn.Dropout(self.dropout_ratio)
      self.fc = nn.Linear(
          in_features=self.feat_dim, out_features=num_classes
      )
      nn.init.normal_(self.fc.weight, 0, self.init_std)
      nn.init.constant_(self.fc.bias, 0)
  
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 1 to create a new ActionRecResNetV1b object from inherited base classes: nn with example: obj = ActionRecResNetV1b(depth, num_classes, pretrained_base, dropout_ratio, init_std, num_segment, num_crop, feat_ext, partial_bn)