code: def __init__(self, model_file, layer="fc1", image_size=(112, 112)):
      import mxnet as mx
  
      self.mx = mx
      cvd = os.environ.get("CUDA_VISIBLE_DEVICES", "").strip()
      if len(cvd) > 0 and int(cvd) != -1:
          ctx = [self.mx.gpu(ii) for ii in range(len(cvd.split(",")))]
      else:
          ctx = [self.mx.cpu()]
  
      prefix, epoch = model_file.split(",")
      print(">>>> loading mxnet model:", prefix, epoch, ctx)
      sym, arg_params, aux_params = self.mx.model.load_checkpoint(
          prefix, int(epoch)
      )
      all_layers = sym.get_internals()
      sym = all_layers[layer + "_output"]
      model = self.mx.mod.Module(
          symbol=sym, context=ctx, label_names=None
      )
      model.bind(
          data_shapes=[("data", (1, 3, image_size[0], image_size[1]))]
      )
      model.set_params(arg_params, aux_params)
      self.model = model
  
imports: import os
  import cv2
  import numpy
  import pandas
  from tqdm import tqdm
  from skimage import transform
  from sklearn.preprocessing import normalize
  from sklearn.metrics import roc_curve, auc
label_desc: Use image node_id 1 to create a new Mxnet_model_interf object  with example: obj = Mxnet_model_interf(model_file, layer, image_size)