Comments (3)
有尝试过转换未经过onnx-simplifier-master的模型吗?
from x2paddle.
用onnx=1.6.0一直提示 onnx==1.5.0 is required
所以环境用的pytorch1.3,onnx=1.5.0,onnxruntime=1.0.0,使用未经过onnx-simplifier-master转换的SSD模型,错误如下:
(pytorch1.3) zt@zt:~/androidprojects/X2Paddle-develop$ x2paddle --framework=onnx --model=test.onnx --save_dir=pd_model
Now translating model from onnx to paddle.
model ir_version: 4, op version: 9
onnxruntime==0.4.0 is required
Total nodes: 206
in (Constant -> _107): attribute "shape" of _107 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _111): attribute "shape" of _111 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _160): attribute "shape" of _160 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _163): attribute "shape" of _163 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _168): attribute "shape" of _168 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _171): attribute "shape" of _171 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _176): attribute "shape" of _176 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _179): attribute "shape" of _179 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _184): attribute "shape" of _184 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _187): attribute "shape" of _187 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _192): attribute "shape" of _192 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _195): attribute "shape" of _195 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _200): attribute "shape" of _200 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _203): attribute "shape" of _203 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _209): attribute "shape" of _209 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _212): attribute "shape" of _212 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _217): attribute "shape" of _217 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _220): attribute "shape" of _220 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _225): attribute "shape" of _225 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _228): attribute "shape" of _228 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _233): attribute "shape" of _233 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _236): attribute "shape" of _236 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _241): attribute "shape" of _241 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _244): attribute "shape" of _244 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _249): attribute "shape" of _249 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _252): attribute "shape" of _252 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _258): attribute "shape" of _258 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _261): attribute "shape" of _261 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _262): attribute "shape" of _262 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _268): attribute "shape" of _268 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _271): attribute "shape" of _271 not inferred, using value as 1-D tensor may lead to fails
in (Constant -> _272): attribute "shape" of _272 not inferred, using value as 1-D tensor may lead to fails
Traceback (most recent call last):
File "/home/zt/tools/anaconda3/envs/pytorch1.1/bin/x2paddle", line 11, in
load_entry_point('x2paddle==0.6.0', 'console_scripts', 'x2paddle')()
File "/home/zt/androidprojects/X2Paddle-develop/x2paddle/convert.py", line 233, in main
onnx2paddle(args.model, args.save_dir, params_merge)
File "/home/zt/androidprojects/X2Paddle-develop/x2paddle/convert.py", line 170, in onnx2paddle
mapper = ONNXOpMapper(model, save_dir)
File "/home/zt/androidprojects/X2Paddle-develop/x2paddle/op_mapper/onnx_op_mapper.py", line 90, in init
func(node)
File "/home/zt/androidprojects/X2Paddle-develop/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()
并且torchvision里的model大部分转换都失败,只有直接使用提供的shuffleNet onnx能转换成功.
x2paddle --framework=onnx --model=resnet18.onnx --save_dir=pd_model
Now translating model from onnx to paddle.
model ir_version: 4, op version: 9
onnxruntime==0.4.0 is required
Total nodes: 69
Traceback (most recent call last):
File "/home/zt/tools/anaconda3/envs/pytorch1.1/bin/x2paddle", line 11, in
load_entry_point('x2paddle==0.6.0', 'console_scripts', 'x2paddle')()
File "/home/zt/androidprojects/X2Paddle-develop/x2paddle/convert.py", line 233, in main
onnx2paddle(args.model, args.save_dir, params_merge)
File "/home/zt/androidprojects/X2Paddle-develop/x2paddle/convert.py", line 170, in onnx2paddle
mapper = ONNXOpMapper(model, save_dir)
File "/home/zt/androidprojects/X2Paddle-develop/x2paddle/op_mapper/onnx_op_mapper.py", line 96, in init
self.elementwise_map(node)
File "/home/zt/androidprojects/X2Paddle-develop/x2paddle/op_mapper/onnx_op_mapper.py", line 277, in elementwise_map
if len(val_x_shape) < len(val_y_shape):
TypeError: object of type 'NoneType' has no len()
from x2paddle.
已解决x2paddle更新到0.7.0就没问题了
from x2paddle.
Related Issues (20)
- 这里的模型怎么转onnx?转完后怎么用?https://github.com/doc-analysis/TableBank/blob/master/MODEL_ZOO.md HOT 1
- yolov8的分割模型转paddle,在paddle中该如何调用 HOT 1
- ViusalDL在线模型转换ONNX2Paddle勾选转成Paddle-Lite支持格式,报错[Convertion error] No module named 'paddlelite'.
- x2paddle.convert.tf2paddle报错 不支持 op ReverseSequence TensorArrayV3 TensorArrayScatterV3
- x2paddle.convert.onnx2paddle
- GridSample, ReduceLogSumExp, Einsum三个算子不支持
- 报错:ImportError:generic_type:type "_gpuDeviceProperties is already registered! HOT 1
- 转pytorch到paddle报错 HOT 1
- ONNX 转 Paddle,MaxUnpool不支持
- PyTorch转换为Paddle; Paddle不支持 convert failed node:_features_conv0_Conv_output_0, op_type is Conv
- onnx转换为paddle模型报错
- yolov8_simply_model.onnx转paddle model报错
- ONNX opset_verison 11 转为 Paddle 时 Round 算子不支持
- X2Paddle CI 建设
- 转chatglm2的onnx推理模型时,调用onnx2paddle接口时,会报错模型太大。 HOT 2
- x2paddle转换yolov5后推理报错 HOT 1
- 5 OPs are not supported yet
- 在onnx转PaddlePaddle时报错AssertionError,aspp模块转化有问题
- 已经把yolov8模型利用#x2paddle --framework=paddle --model=best.paddle --save_dir= 转换成功,但是面对转换成功的我如何进行推理调用呢?就是在paddlepaddle框架内?
- FlagEmbedding模型onnx转paddle成功但是转换后模型无法加载 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from x2paddle.