docstr: Builds a X3D model.
  
  Args:
      cfg (CfgNode): model building configs, details are in the
          comments of the config file.
code: def _construct_network(self, cfg):
      """
      Builds a X3D model.
  
      Args:
          cfg (CfgNode): model building configs, details are in the
              comments of the config file.
      """
  
      # Params from configs.
      norm_module = get_norm(cfg)
      temp_kernel = _TEMPORAL_KERNEL_BASIS[cfg.MODEL.ARCH]
  
      self.model = create_x3d(
          # Input clip configs.
          input_channel=cfg.DATA.INPUT_CHANNEL_NUM[0],
          input_clip_length=cfg.DATA.NUM_FRAMES,
          input_crop_size=cfg.DATA.TRAIN_CROP_SIZE,
          # Model configs.
          model_num_class=cfg.MODEL.NUM_CLASSES,
          dropout_rate=cfg.MODEL.DROPOUT_RATE,
          width_factor=cfg.X3D.WIDTH_FACTOR,
          depth_factor=cfg.X3D.DEPTH_FACTOR,
          # Normalization configs.
          norm=norm_module,
          norm_eps=1e-5,
          norm_momentum=0.1,
          # Activation configs.
          activation=partial(nn.ReLU, inplace=cfg.RESNET.INPLACE_RELU),
          # Stem configs.
          stem_dim_in=cfg.X3D.DIM_C1,
          stem_conv_kernel_size=(temp_kernel[0][0][0], 3, 3),
          stem_conv_stride=(1, 2, 2),
          # Stage configs.
          stage_conv_kernel_size=(
              (temp_kernel[1][0][0], 3, 3),
              (temp_kernel[2][0][0], 3, 3),
              (temp_kernel[3][0][0], 3, 3),
              (temp_kernel[4][0][0], 3, 3),
          ),
          stage_spatial_stride=(2, 2, 2, 2),
          stage_temporal_stride=(1, 1, 1, 1),
          bottleneck=create_x3d_bottleneck_block,
          bottleneck_factor=cfg.X3D.BOTTLENECK_FACTOR,
          se_ratio=0.0625,
          inner_act=Swish,
          # Head configs.
          head_dim_out=cfg.X3D.DIM_C5,
          head_pool_act=partial(
              nn.ReLU, inplace=cfg.RESNET.INPLACE_RELU
          ),
          head_bn_lin5_on=cfg.X3D.BN_LIN5,
          head_activation=None,
          head_output_with_global_average=False,
      )
  
      self.post_act = get_head_act(cfg.MODEL.HEAD_ACT)
  
imports: from functools import partial
  import torch.nn
  from detectron2.layers import ROIAlign
  from slowfast.models.batchnorm_helper import get_norm
  from slowfast.models.video_model_builder import _POOL1, _TEMPORAL_KERNEL_BASIS
  from pytorchvideo.models.csn import create_csn
  from pytorchvideo.models.head import create_res_basic_head, create_res_roi_pooling_head
  from pytorchvideo.models.r2plus1d import create_2plus1d_bottleneck_block, create_r2plus1d
  from pytorchvideo.models.resnet import create_bottleneck_block, create_resnet
  from pytorchvideo.models.slowfast import create_slowfast
  from pytorchvideo.models.vision_transformers import create_multiscale_vision_transformers
  from pytorchvideo.models.x3d import Swish, create_x3d, create_x3d_bottleneck_block
  from .build import MODEL_REGISTRY
label_desc: Use image node_id 2 for calling the PTVX3D obj's underlying member method code with example usage: obj._construct_network(cfg) without return types