code: import tvm
  from tvm import relay
  from tvm import relay
  from tvm.runtime.vm import VirtualMachine
  from tvm.contrib.download import download_testdata
  from SimpleModel import Net
  import numpy as np
  import cv2
  
  # PyTorch imports
  import torch
  import torchvision
  
  # Time library for speed check
  import time
  
  in_size = 32
  
  input_shape = (1, 3, in_size, in_size)
  
  
  def do_trace(model, inp):
      model_trace = torch.jit.trace(model, inp)
      model_trace.eval()
      return model_trace
  
  
  # model_func = torchvision.models.detection.maskrcnn_resnet50_fpn
  # model = TraceWrapper(model_func(pretrained=True))
  
  model = Net()
  model.load_state_dict(torch.load('./simple_mod.pth'))
  
  model.eval()
  inp = torch.Tensor(np.random.uniform(0.0, 250.0, size=(1, 3, in_size, in_size)))
  
  with torch.no_grad():
      out = model(inp)
      script_module = do_trace(model, inp)
      
  
  img_url = (
      "https://raw.githubusercontent.com/dmlc/web-data/" "master/gluoncv/detection/street_small.jpg"
  )
  img_path = download_testdata(img_url, "test_street_small.jpg", module="data")
  
  img = cv2.imread(img_path).astype("float32")
  img = cv2.resize(img, (in_size, in_size))
  img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
  img = np.transpose(img / 255.0, [2, 0, 1])
  img = np.expand_dims(img, axis=0)
  
  input_name = "input0"
  shape_list = [(input_name, input_shape)]
  mod, params = relay.frontend.from_pytorch(script_module, shape_list)
  
  target = "llvm"
  
  with tvm.transform.PassContext(opt_level=2, disabled_pass=["FoldScaleAxis"]):
      vm_exec = relay.vm.compile(mod, target=target, params=params)
  
  # dev = tvm.cuda()
  dev = tvm.cpu()
  vm = VirtualMachine(vm_exec, dev)
  vm.set_input("main", **{input_name: img})
  inference_start = time.time()
  tvm_res = vm.run()
  inference_end = time.time()
  inference_time_tvm = inference_end - inference_start
  print("Infernece Time : {}".format(inference_time_tvm))
  
  
  
apis: numpy.random.uniform numpy.transpose torch.load torch.no_grad numpy.expand_dims torch.jit.trace