code: def get_model(model, device, opt):
      """Model initialization."""
      kwargs = {
          "device": device,
          "pretrained": opt.use_pretrained,
          "classes": classes,
      }
      if model.startswith("resnet"):
          kwargs["thumbnail"] = opt.use_thumbnail
      elif model.startswith("vgg"):
          kwargs["batch_norm"] = opt.batch_norm
  
      net = models.get_model(model, **kwargs)
      if opt.resume:
          net.load_parameters(opt.resume)
      elif not opt.use_pretrained:
          if model in ["alexnet"]:
              net.initialize(mx.init.Normal())
          else:
              net.initialize(mx.init.Xavier(magnitude=2))
      net.cast(opt.dtype)
      return net
  
file_path: mxnet/example/gluon/image_classification.py
imports: from __future__ import division
  import argparse, time, os
  import logging
  import mxnet
  from mxnet import gluon
  from mxnet import profiler
  from mxnet.gluon import nn
  from mxnet.gluon.model_zoo import vision
  from mxnet import autograd
  from mxnet.test_utils import get_mnist_iterator
  from mxnet.gluon.metric import Accuracy, TopKAccuracy, CompositeEvalMetric
  import numpy
  from data import get_cifar10_iterator, get_imagenet_iterator, get_caltech101_iterator, dummy_iterator
label_desc: Use image node_id 1 for calling a global function with example usage: get_model(model, device, opt) and returns: net