class_docstr: SlowFast networks (SlowFast) from
  `"SlowFast Networks for Video Recognition"
  <https://arxiv.org/abs/1812.03982>`_ paper.
  
  Parameters
  ----------
  nclass : int.
      Number of categories in the dataset.
  block : a HybridBlock.
      Building block of a ResNet, could be Basic or Bottleneck.
  layers : a list or tuple, default is None.
      Number of stages in a ResNet, e.g., [3, 4, 6, 3] in ResNet50.
  num_block_temp_kernel_fast : int, default is None.
      If the current block has more than NUM_BLOCK_TEMP_KERNEL blocks,
      use temporal kernel of 1 for the rest of the blocks.
  num_block_temp_kernel_slow : int, default is None.
      If the current block has more than NUM_BLOCK_TEMP_KERNEL blocks,
      use temporal kernel of 1 for the rest of the blocks.
  pretrained : bool or str.
      Boolean value controls whether to load the default pretrained weights for model.
      String value represents the hashtag for a certain version of pretrained weights.
  pretrained_base : bool or str, optional, default is True.
      Load pretrained base network, the extra layers are randomized. Note that
      if pretrained is `True`, this has no effect.
  feat_ext : bool.
      Whether to extract features before dense classification layer or
      do a complete forward pass.
  num_segments : int, default is 1.
      Number of segments used to evenly divide a video.
  num_crop : int, default is 1.
      Number of crops used during evaluation, choices are 1, 3 or 10.
  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.
  partial_bn : bool, default False.
      Freeze all batch normalization layers during training except the first layer.
  frozen_stages : int.
      Stages to be frozen (all param fixed). -1 means not freezing any parameters.
  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.001.
      Standard deviation value when initialize the dense layers.
  alpha : int, default is 8.
      Corresponds to the frame rate reduction ratio between the Slow and Fast pathways.
  beta_inv : int, default is 8.
      Corresponds to the inverse of the channel reduction ratio between the Slow and Fast pathways.
  fusion_conv_channel_ratio : int, default is 2.
      Ratio of channel dimensions between the Slow and Fast pathways.
  fusion_kernel_size : int, default is 5.
      Kernel dimension used for fusing information from Fast pathway to Slow pathway.
  width_per_group : int, default is 64.
      Width of each group (64 -> ResNet; 4 -> ResNeXt).
  num_groups : int, default is 1.
      Number of groups for the convolution.
      Num_groups=1 is for standard ResNet like networks,
      and num_groups>1 is for ResNeXt like networks.
  slow_temporal_stride : int, default 16.
      The temporal stride for sparse sampling of video frames in slow branch of a SlowFast network.
  fast_temporal_stride : int, default 2.
      The temporal stride for sparse sampling of video frames in fast branch of a SlowFast network.
  slow_frames : int, default 4.
      The number of frames used as input to a slow branch.
  fast_frames : int, default 32.
      The number of frames used as input to a fast branch.
  norm_layer : object
      Normalization layer used (default: :class:`mxnet.gluon.nn.BatchNorm`)
      Can be :class:`mxnet.gluon.nn.BatchNorm` or :class:`mxnet.gluon.contrib.nn.SyncBatchNorm`.
  norm_kwargs : dict
      Additional `norm_layer` arguments, for example `num_devices=4`
      for :class:`mxnet.gluon.contrib.nn.SyncBatchNorm`.
  ctx : Context, default CPU.
      The context in which to load the pretrained weights.
class_docstr_tok: ["SlowFast","networks","(","SlowFast",")","from","`","``","SlowFast","Networks","for","Video","Recognition","''","<","https",":","\/\/arxiv.org\/abs\/1812.03982",">","`","_","paper",".","Parameters","--","--","--","--","--","nclass",":","int",".","Number","of","categories","in","the","dataset",".","block",":","a","HybridBlock",".","Building","block","of","a","ResNet",",","could","be","Basic","or","Bottleneck",".","layers",":","a","list","or","tuple",",","default","is","None",".","Number","of","stages","in","a","ResNet",",","e.g.",",","[","3",",","4",",","6",",","3","]","in","ResNet50",".","num_block_temp_kernel_fast",":","int",",","default","is","None",".","If","the","current","block","has","more","than","NUM_BLOCK_TEMP_KERNEL","blocks",",","use","temporal","kernel","of","1","for","the","rest","of","the","blocks",".","num_block_temp_kernel_slow",":","int",",","default","is","None",".","If","the","current","block","has","more","than","NUM_BLOCK_TEMP_KERNEL","blocks",",","use","temporal","kernel","of","1","for","the","rest","of","the","blocks",".","pretrained",":","bool","or","str",".","Boolean","value","controls","whether","to","load","the","default","pretrained","weights","for","model",".","String","value","represents","the","hashtag","for","a","certain","version","of","pretrained","weights",".","pretrained_base",":","bool","or","str",",","optional",",","default","is","True",".","Load","pretrained","base","network",",","the","extra","layers","are","randomized",".","Note","that","if","pretrained","is","`","True","`",",","this","has","no","effect",".","feat_ext",":","bool",".","Whether","to","extract","features","before","dense","classification","layer","or","do","a","complete","forward","pass",".","num_segments",":","int",",","default","is","1",".","Number","of","segments","used","to","evenly","divide","a","video",".","num_crop",":","int",",","default","is","1",".","Number","of","crops","used","during","evaluation",",","choices","are","1",",","3","or","10.","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",".","partial_bn",":","bool",",","default","False",".","Freeze","all","batch","normalization","layers","during","training","except","the","first","layer",".","frozen_stages",":","int",".","Stages","to","be","frozen","(","all","param","fixed",")",".","-1","means","not","freezing","any","parameters",".","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.001",".","Standard","deviation","value","when","initialize","the","dense","layers",".","alpha",":","int",",","default","is","8",".","Corresponds","to","the","frame","rate","reduction","ratio","between","the","Slow","and","Fast","pathways",".","beta_inv",":","int",",","default","is","8",".","Corresponds","to","the","inverse","of","the","channel","reduction","ratio","between","the","Slow","and","Fast","pathways",".","fusion_conv_channel_ratio",":","int",",","default","is","2",".","Ratio","of","channel","dimensions","between","the","Slow","and","Fast","pathways",".","fusion_kernel_size",":","int",",","default","is","5",".","Kernel","dimension","used","for","fusing","information","from","Fast","pathway","to","Slow","pathway",".","width_per_group",":","int",",","default","is","64",".","Width","of","each","group","(","64","-",">","ResNet",";","4","-",">","ResNeXt",")",".","num_groups",":","int",",","default","is","1",".","Number","of","groups","for","the","convolution",".","Num_groups=1","is","for","standard","ResNet","like","networks",",","and","num_groups",">","1","is","for","ResNeXt","like","networks",".","slow_temporal_stride",":","int",",","default","16",".","The","temporal","stride","for","sparse","sampling","of","video","frames","in","slow","branch","of","a","SlowFast","network",".","fast_temporal_stride",":","int",",","default","2",".","The","temporal","stride","for","sparse","sampling","of","video","frames","in","fast","branch","of","a","SlowFast","network",".","slow_frames",":","int",",","default","4",".","The","number","of","frames","used","as","input","to","a","slow","branch",".","fast_frames",":","int",",","default","32",".","The","number","of","frames","used","as","input","to","a","fast","branch",".","norm_layer",":","object","Normalization","layer","used","(","default",":",":","class",":","`","mxnet.gluon.nn.BatchNorm","`",")","Can","be",":","class",":","`","mxnet.gluon.nn.BatchNorm","`","or",":","class",":","`","mxnet.gluon.contrib.nn.SyncBatchNorm","`",".","norm_kwargs",":","dict","Additional","`","norm_layer","`","arguments",",","for","example","`","num_devices=4","`","for",":","class",":","`","mxnet.gluon.contrib.nn.SyncBatchNorm","`",".","ctx",":","Context",",","default","CPU",".","The","context","in","which","to","load","the","pretrained","weights","."]
docstr: Build each stage of within the fast branch.
docstr_tok: ["Build","each","stage","of","within","the","fast","branch","."]
code: def _make_layer_fast(
      self,
      inplanes,
      planes,
      num_blocks,
      num_block_temp_kernel_fast=None,
      block=Bottleneck,
      strides=1,
      head_conv=1,
      norm_layer=BatchNorm,
      norm_kwargs=None,
      layer_name="",
  ):
      """Build each stage of within the fast branch."""
      downsample = None
      if strides != 1 or inplanes != planes * block.expansion:
          downsample = nn.HybridSequential(
              prefix=layer_name + "downsample_"
          )
          with downsample.name_scope():
              downsample.add(
                  nn.Conv3D(
                      in_channels=inplanes,
                      channels=planes * block.expansion,
                      kernel_size=1,
                      strides=(1, strides, strides),
                      use_bias=False,
                  )
              )
              downsample.add(
                  norm_layer(
                      in_channels=planes * block.expansion,
                      **({} if norm_kwargs is None else norm_kwargs),
                  )
              )
  
      layers = nn.HybridSequential(prefix=layer_name)
      cnt = 0
      with layers.name_scope():
          layers.add(
              block(
                  inplanes=inplanes,
                  planes=planes,
                  strides=strides,
                  downsample=downsample,
                  head_conv=head_conv,
                  layer_name="block%d_" % cnt,
              )
          )
          inplanes = planes * block.expansion
          cnt += 1
          for _ in range(1, num_blocks):
              if num_block_temp_kernel_fast is not None:
                  if cnt < num_block_temp_kernel_fast:
                      layers.add(
                          block(
                              inplanes=inplanes,
                              planes=planes,
                              head_conv=head_conv,
                              layer_name="block%d_" % cnt,
                          )
                      )
                  else:
                      layers.add(
                          block(
                              inplanes=inplanes,
                              planes=planes,
                              head_conv=1,
                              layer_name="block%d_" % cnt,
                          )
                      )
              else:
                  layers.add(
                      block(
                          inplanes=inplanes,
                          planes=planes,
                          head_conv=head_conv,
                          layer_name="block%d_" % cnt,
                      )
                  )
              cnt += 1
      return layers
  
imports: from mxnet import init
  from mxnet.context import cpu
  from mxnet.gluon.block import HybridBlock
  from mxnet.gluon import nn
  from mxnet.gluon.nn import BatchNorm
label_desc: Use image node_id 5 for calling the SlowFast obj's underlying member method code with example usage: obj._make_layer_fast(inplanes, planes, num_blocks, num_block_temp_kernel_fast, block, strides, head_conv, norm_layer, norm_kwargs, layer_name) and returns: layers