code: def test(net, val_data, ctx):
      metric = mx.metric.Accuracy()
      for i, batch in enumerate(val_data):
          data = gluon.utils.split_and_load(
              batch[0], ctx_list=ctx, batch_axis=0, even_split=False
          )
          label = gluon.utils.split_and_load(
              batch[1], ctx_list=ctx, batch_axis=0, even_split=False
          )
          outputs = [net(X) for X in data]
          metric.update(label, outputs)
  
      return metric.get()
  
file_path: gluon-cv/docs/tutorials/classification/transfer_learning_minc.py
imports: import zipfile, os
  from gluoncv.utils import download
  import mxnet
  import numpy
  import os, time, shutil
  from mxnet import gluon, image, init, nd
  from mxnet import autograd
  from mxnet.gluon import nn
  from mxnet.gluon.data.vision import transforms
  from gluoncv.utils import makedirs
  from gluoncv.model_zoo import get_model
label_desc: Use image node_id 1 for calling a global function with example usage: test(net, val_data, ctx) and returns: metric