code: def resnet50_v1b_custom(cfg):
      model = ActionRecResNetV1b(
          depth=50,
          num_classes=cfg.CONFIG.DATA.NUM_CLASSES,
          pretrained_base=cfg.CONFIG.MODEL.PRETRAINED_BASE,
          feat_ext=cfg.CONFIG.INFERENCE.FEAT,
          partial_bn=cfg.CONFIG.MODEL.PARTIAL_BN,
          num_segment=cfg.CONFIG.DATA.NUM_SEGMENT,
          num_crop=cfg.CONFIG.DATA.NUM_CROP,
          dropout_ratio=0.5,
          init_std=0.01,
      )
  
      if cfg.CONFIG.MODEL.PRETRAINED:
          from ..model_store import get_model_file
  
          state_dict = torch.load(
              get_model_file(
                  "resnet50_v1b_kinetics400",
                  tag=cfg.CONFIG.MODEL.PRETRAINED,
              )
          )
          for k in list(state_dict.keys()):
              # retain only backbone up to before the classification layer
              if k.startswith("fc"):
                  del state_dict[k]
  
          msg = model.load_state_dict(state_dict, strict=False)
          assert set(msg.missing_keys) == {"fc.weight", "fc.bias"}
          print(
              "=> Initialized from a ResNet50 model pretrained on Kinetcis400 dataset"
          )
      return model
  
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 7 for calling a global function with example usage: resnet50_v1b_custom(cfg) and returns: model