I use pytorch 1.1.0 and covert the model to onnx. Then I use tvm to compile onnx model, I found this error:
And I add some debug info, I found the op “unsample” cause the " AttributeError: ‘<class ‘tvm.relay.expr.Call’>’ object has no attribute ‘name_hint’"
debug: Floor
debug: Unsqueeze
debug: Unsqueeze
debug: Concat
debug: Cast
debug: Shape
debug: Slice
WARNING:root:Attribute axes is ignored in relay.sym.strided_slice
debug: Cast
debug: Div
debug: Concat
debug: Upsample
Traceback (most recent call last):
File "build_onnx.py", line 12, in <module>
mod, params = relay.frontend.from_onnx(onnx_model, shape_dict)
File "/home/removebg/mscoco/code/tvm/python/tvm/relay/frontend/onnx.py", line 1264, in from_onnx
mod, params = g.from_onnx(graph, opset)
File "/home/removebg/mscoco/code/tvm/python/tvm/relay/frontend/onnx.py", line 1092, in from_onnx
op = self._convert_operator(op_name, inputs, attr, opset)
File "/home/removebg/mscoco/code/tvm/python/tvm/relay/frontend/onnx.py", line 1198, in _convert_operator
sym = convert_map[op_name](inputs, attrs, self._params)
File "/home/removebg/mscoco/code/tvm/python/tvm/relay/frontend/onnx.py", line 557, in _impl_v9
scales = params[inputs[1].name_hint].asnumpy()
File "/home/removebg/mscoco/code/tvm/python/tvm/_ffi/_ctypes/node.py", line 75, in __getattr__
"'%s' object has no attribute '%s'" % (str(type(self)), name))
AttributeError: '<class 'tvm.relay.expr.Call'>' object has no attribute 'name_hint'