code: def tpn_resnet50_f8s8_kinetics400(cfg):
      neck = TPN(
          in_channels=[1024, 2048],
          out_channels=1024,
          spatial_modulation_config=dict(
              inplanes=[1024, 2048],
              planes=2048,
          ),
          temporal_modulation_config=dict(
              scales=(8, 8),
              param=dict(
                  inplanes=-1,
                  planes=-1,
                  downsample_scale=-1,
              ),
          ),
          upsampling_config=dict(
              scale=(1, 1, 1),
          ),
          downsampling_config=dict(
              scales=(1, 1, 1),
              param=dict(
                  inplanes=-1,
                  planes=-1,
                  downsample_scale=-1,
              ),
          ),
          level_fusion_config=dict(
              in_channels=[1024, 1024],
              mid_channels=[1024, 1024],
              out_channels=2048,
              ds_scales=[(1, 1, 1), (1, 1, 1)],
          ),
          aux_head_config=dict(
              inplanes=-1,
              planes=cfg.CONFIG.DATA.NUM_CLASSES,
              loss_weight=0.5,
          ),
      )
  
      model = TPNet(
          depth=50,
          TPN_neck=neck,
          num_classes=cfg.CONFIG.DATA.NUM_CLASSES,
          pretrained=cfg.CONFIG.MODEL.PRETRAINED,
          pretrained_base=cfg.CONFIG.MODEL.PRETRAINED_BASE,
          feat_ext=cfg.CONFIG.INFERENCE.FEAT,
          bn_eval=cfg.CONFIG.MODEL.BN_EVAL,
          partial_bn=cfg.CONFIG.MODEL.PARTIAL_BN,
          bn_frozen=cfg.CONFIG.MODEL.BN_FROZEN,
      )
  
      if cfg.CONFIG.MODEL.PRETRAINED:
          from ..model_store import get_model_file
  
          model.load_state_dict(
              torch.load(
                  get_model_file(
                      "tpn_resnet50_f8s8_kinetics400",
                      tag=cfg.CONFIG.MODEL.PRETRAINED,
                  )
              )
          )
      return model
  
imports: import numpy
  import torch
  import torch.nn
  import torch.utils.checkpoint
  import torch.nn.functional
label_desc: Use image node_id 6 for calling a global function with example usage: tpn_resnet50_f8s8_kinetics400(cfg) and returns: model