code: def model_creator(config):
      model = torchvision.models.resnet18(pretrained=True)
      # Freeze all the network except the final layer.
      for param in model.parameters():
          param.requires_grad = False
      # Parameters of newly constructed modules have requires_grad=True by default
      num_ftrs = model.fc.in_features
      model.fc = nn.Linear(num_ftrs, 2)
      return model
  
file_path: BigDL/python/orca/tutorial/pytorch/transfer_learning/train.py
imports: import os
  import numpy
  import matplotlib.pyplot
  import torch
  import torch.nn
  import torch.optim
  from torch.optim import lr_scheduler
  import torchvision
  from torchvision import datasets, transforms
  from bigdl.orca import init_orca_context, stop_orca_context
  from bigdl.orca.learn.pytorch import Estimator
  from bigdl.orca.learn.metrics import Accuracy
label_desc: Use image node_id 5 for calling a global function with example usage: model_creator(config) and returns: model