code: def pnasnet5large(pretrained="imagenet"):
      """Pretrained PNASNet"""
  
      # both 'imagenet'&'imagenet+background' are loaded from same parameters
      model = PNASNet5Large(num_classes=1001)
  
      if pretrained:
          settings = pretrained_settings["pnasnet5large"][pretrained]
          model.load_state_dict(model_zoo.load_url(settings["url"]))
  
      if pretrained == "imagenet":
          new_last_linear = nn.Linear(
              model.last_linear.in_features, settings["num_classes"]
          )
          new_last_linear.weight.data = model.last_linear.weight.data[
              1:
          ]
          new_last_linear.bias.data = model.last_linear.bias.data[1:]
          model.last_linear = new_last_linear
  
      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
  
imports: from collections import OrderedDict
  import torch
  import torch.nn
  import torch.utils.model_zoo
label_desc: Use image node_id 1 for calling a global function with example usage: pnasnet5large(pretrained) and returns: model