Load onnx to relay error


#1

I wanted to load onnx to relay, but errors appeared:
import tvm
import onnx
import tvm.relay as relay
onnx_model = onnx.load_model(model_name)
sym, params = relay.frontend.from_onnx(onnx_model, shape=shape_dict, dtype=dtype_dict)

Error messages:
%191 = %190.0
%192 = shape_of(%191, dtype=“int32”)
%193 = take(%192, int64(0), axis=0)
%194 = expand_dims(%193, axis=0)
%195 = expand_dims(int64(-1), axis=0)
%196 = (%194, %195)
concatenate(%196)an internal invariant was violated while typechecking your program [17:52:19] /home/tracy/work/tvm/tvm-master-20190508/src/relay/op/tensor/transform.cc:204: Check failed: e_dtype == dtype (int64 vs. int32) : relay.concatenate requires all tensors have the same dtype
;
}
// meta data omitted. you can use show_meta_data=True to include meta data
Other has the same problem “[Relay][ONNX]load Resnet.onnx to relay failed”, but doesn’t get any answer from the developers.
Can someone of developers tell me the reason even if it can’t be solved at present, thanks!