onnx转paddle失败
Created by: Anikily
Now translating model from onnx to paddle. model ir_version: 4, op version: 9 W1127 21:32:25.501857 54097 init.cc:125] Compiled with WITH_GPU, but no GPU found in runtime. Traceback (most recent call last): File "/home/yulu/anaconda3/envs/paddle/bin/onnx_infer", line 11, in load_entry_point('x2paddle==0.6.0', 'console_scripts', 'onnx_infer')() File "/home/yulu/anaconda3/envs/paddle/lib/python3.6/site-packages/x2paddle-0.6.0-py3.6.egg/x2paddle/onnx_infer.py", line 39, in main sess = rt.InferenceSession(model_dir) File "/home/yulu/anaconda3/envs/paddle/lib/python3.6/site-packages/onnxruntime/capi/session.py", line 29, in init self._sess.load_model(path_or_bytes) RuntimeError: [ONNXRuntimeError] : 1 : GENERAL ERROR : Load model from pd_model/tmp_data/onnx_model_infer.onnx failed:Type Error: Type parameter (T) bound to different types (tensor(float) and tensor(int64) in node (_1211). Total nodes: 545 in (Constant -> _1146): attribute "shape" of _1146 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1161): attribute "shape" of _1161 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1162): attribute "shape" of _1162 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1171): attribute "shape" of _1171 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1174): attribute "shape" of _1174 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1177): attribute "shape" of _1177 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1181): attribute "shape" of _1181 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1184): attribute "shape" of _1184 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1187): attribute "shape" of _1187 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1190): attribute "shape" of _1190 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1193): attribute "shape" of _1193 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1201): attribute "shape" of _1201 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1224): attribute "shape" of _1224 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1227): attribute "shape" of _1227 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1230): attribute "shape" of _1230 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1234): attribute "shape" of _1234 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1242): attribute "shape" of _1242 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1255): attribute "shape" of _1255 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1262): attribute "shape" of _1262 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1275): attribute "shape" of _1275 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1285): attribute "shape" of _1285 not inferred, using value as 1-D tensor may lead to fails in (Constant -> _1286): attribute "shape" of _1286 not inferred, using value as 1-D tensor may lead to fails Traceback (most recent call last): File "/home/yulu/anaconda3/envs/paddle/bin/x2paddle", line 11, in load_entry_point('x2paddle==0.6.0', 'console_scripts', 'x2paddle')() File "/home/yulu/anaconda3/envs/paddle/lib/python3.6/site-packages/x2paddle-0.6.0-py3.6.egg/x2paddle/convert.py", line 233, in main onnx2paddle(args.model, args.save_dir, params_merge) File "/home/yulu/anaconda3/envs/paddle/lib/python3.6/site-packages/x2paddle-0.6.0-py3.6.egg/x2paddle/convert.py", line 170, in onnx2paddle mapper = ONNXOpMapper(model, save_dir) File "/home/yulu/anaconda3/envs/paddle/lib/python3.6/site-packages/x2paddle-0.6.0-py3.6.egg/x2paddle/op_mapper/onnx_op_mapper.py", line 90, in init func(node) File "/home/yulu/anaconda3/envs/paddle/lib/python3.6/site-packages/x2paddle-0.6.0-py3.6.egg/x2paddle/op_mapper/onnx_op_mapper.py", line 513, in Unsqueeze if len(val_x.out_shapes[0]) == 0: TypeError: object of type 'NoneType' has no len()