code: def resnext101_32x4d(num_classes=1000, pretrained="imagenet"):
      model = ResNeXt101_32x4d(num_classes=num_classes)
      model_blob = ResNeXt101_32x4d_blob(num_classes=num_classes)
      if pretrained is not None:
          settings = pretrained_settings["resnext101_32x4d"][pretrained]
          if num_classes != settings["num_classes"]:
              raise AssertionError(
                  "num_classes should be {}, but is {}".format(
                      settings["num_classes"], num_classes
                  )
              )
          model_blob.load_state_dict(
              model_zoo.load_url(settings["url"])
          )
  
          model.stem = nn.Sequential(
              model_blob.features[0],
              model_blob.features[1],
              model_blob.features[2],
              model_blob.features[3],
          )
  
          model.layer1 = nn.Sequential(
              model_blob.features[4],
          )
          model.layer2 = nn.Sequential(
              model_blob.features[5],
          )
          model.layer3 = nn.Sequential(
              model_blob.features[6],
          )
          model.layer4 = nn.Sequential(
              model_blob.features[7],
          )
          # finish here
  
          model.input_space = settings["input_space"]
          model.input_size = settings["input_size"]
          model.input_range = settings["input_range"]
          model.mean = settings["mean"]
          model.std = settings["std"]
      return model
  
file_path: pywick/pywick/models/segmentation/mnas_linknets/resnext.py
imports: import torch.nn
  import torch.utils.model_zoo
  from .resnext101_32x4d_features import resnext101_32x4d_features, resnext101_32x4d_features_blob
label_desc: Use image node_id 1 for calling a global function with example usage: resnext101_32x4d(num_classes, pretrained) and returns: model