My tvm is 0.6.dev built from source, and my onnx is 1.6, the code is like this:
import onnx
import numpy as np
import tvm
import tvm.relay as relay
import cv2
input_shape = (1, 3, 768, 768)
shape_dict = {'0': input_shape}
impth = '000000000139.jpg'
mdpth = './tmp/model_final_pbn.onnx'
opt_level = 3
target = 'cuda'
model = onnx.load(mdpth)
for el in model.graph.input:
tt = el.type.tensor_type
print(el.name)
print(tt)
mod, params = relay.frontend.from_onnx(model, shape_dict, dtype='float32', opset=11)
And I got the error message of:
TypeError: from_onnx() got an unexpected keyword argument ‘opset’
What is the matter with my code please ?