code: def test(models_list, crops=1, verbose=False):
      batches1 = imagenet_load(data_dir, 256, 224, crops)
      batches2 = imagenet_load(data_dir, 341, 299, crops)
      batches3 = imagenet_load(data_dir, 378, 331, crops)
      inputs, models, shapes, params = [], [], [], []
      labels, preds_list = [], []
      if verbose:
          print("")
  
      with tf.Graph().as_default():
          for _net, _shape, _gpu in models_list:
              with tf.device("gpu:%d" % _gpu):
                  _input = tf.placeholder(
                      tf.float32, [None] + list(_shape)
                  )
                  _model = _net(_input, is_training=False)
                  _weights = _model.get_weights()
                  inputs.append(_input)
                  models.append(_model)
                  shapes.append(_shape)
                  params.append(
                      sum([w.shape.num_elements() for w in _weights])
                  )
  
          with tf.Session() as sess:
              nets.pretrained(models)
              while True:
                  try:
                      batch1, label1 = batches1.next()
                      batch2, label2 = batches2.next()
                      batch3, label3 = batches3.next()
                  except:
                      break
                  feed_dict = dict(
                      (
                          i,
                          m.preprocess(
                              batch1
                              if s[0] == 224
                              else batch2
                              if s[0] == 299
                              else batch3
                          ),
                      )
                      for (i, m, s) in zip(inputs, models, shapes)
                  )
                  preds = sess.run(models, feed_dict)
                  if crops > 1:
                      preds = [
                          np.mean(pred.reshape(-1, crops, 1000), axis=1)
                          for pred in preds
                      ]
                  labels.append(label1)
                  preds_list.append(preds)
                  if verbose:
                      print("."),
          labels = np.concatenate(labels)
  
      if verbose:
          print("")
  
      def err(x):
          return 100 * (1 - sum(x) / float(len(x)))
  
      print("Crops: %d" % crops)
      print("Samples: %d" % len(labels))
      print(
          "|                  | Top-1 | Top-5 | Top-1  | Top-5  | Size  |"
      )
      print(
          "|------------------|-------|-------|--------|--------|-------|"
      )
  
      for i in range(len(models)):
          preds = np.concatenate(
              [
                  np.argsort(pred[i], axis=1)[:, -5:]
                  for pred in preds_list
              ],
              axis=0,
          )
          actuals = labels[: preds.shape[0]]
          top1 = actuals == preds[:, -1]
          top5 = [
              1 if actual in pred else 0
              for (actual, pred) in zip(actuals, preds)
          ]
          print(
              "| %16s | %5d | %5d | %2.3f | %2.3f | %.1fM |"
              % (
                  models[i].aliases[0][:16],
                  sum(top1),
                  sum(top5),
                  err(top1),
                  err(top5),
                  params[i] / 10e5,
              )
          )
  
imports: import numpy
  import tensorflow
  import tensornets
  from tensornets.datasets import imagenet
label_desc: Use image node_id 2 for calling a global function with example usage: test(models_list, crops, verbose) and returns: unknown