code: def __init__(self, model_file, image_size=(112, 112)):
      import torch
  
      self.torch = torch
      cvd = os.environ.get("CUDA_VISIBLE_DEVICES", "").strip()
      device_name = (
          "cuda:0" if len(cvd) > 0 and int(cvd) != -1 else "cpu"
      )
      self.device = self.torch.device(device_name)
      try:
          self.model = self.torch.jit.load(
              model_file, map_location=device_name
          )
      except:
          print(
              "Error: %s is weights only, please load and save the entire model by `torch.jit.save`"
              % model_file
          )
          self.model = None
  
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 Torch_model_interf object  with example: obj = Torch_model_interf(model_file, image_size)