I want to save and load the model compiled by relay.vm.compile
, how can I be !?
Because my model is not able to build with relay.build
thus I was unable to save the model like this lib.export_library(path_lib)
My code:
with tvm.transform.PassContext(opt_level=3, disabled_pass=["FoldScaleAxis"]):
vm_exec = relay.vm.compile(mod, target=TARGET, params=params)
# I want to save model here
dev = tvm.cpu()
vm = VirtualMachine(vm_exec, dev)
# Or save here
vm.set_input("main", **{"input0": sample.cpu().numpy()})
tvm_res = vm.run()
Any ideas !?
I tried to read documents but not found the solutions