PaddlePaddle / X2Paddle

Deep learning model converter for PaddlePaddle. (『飞桨』深度学习模型转换工具)
http://www.paddlepaddle.org/
Apache License 2.0
736 stars 164 forks source link

简单mobilenet分类模型ONNX转paddle出错 #788

Closed kouhinn closed 2 years ago

kouhinn commented 2 years ago

感谢您参与 X2Paddle 社区! 问题模版为了 X2Paddle 能更好的迭代,例如新功能发布、 RoadMaps 和错误跟踪. :smile_cat:

问题描述

简单mobilenet分类模型ONNX转paddle出错。 就是keras自带的mobilenet模型。 代码与onnx模型见如下: 链接:https://pan.baidu.com/s/17EDypFn-UKtLGF-I0EdyGA 提取码:lvjn --来自百度网盘超级会员V6的分享

具体信息

===================Error Information=============== Traceback (most recent call last): File "C:\Users\admin\anaconda3\envs\py37_tensorflow1_14\Scripts\x2paddle-script.py", line 33, in sys.exit(load_entry_point('x2paddle==1.3.5', 'console_scripts', 'x2paddle')()) File "C:\Users\admin\anaconda3\envs\py37_tensorflow1_14\lib\site-packages\x2paddle-1.3.5-py3.7.egg\x2paddle\convert.py", line 373, in main lite_model_type=args.lite_model_type) File "C:\Users\admin\anaconda3\envs\py37_tensorflow1_14\lib\site-packages\x2paddle-1.3.5-py3.7.egg\x2paddle\convert.py", line 234, in onnx2paddle mapper.paddle_graph.gen_model(save_dir) File "C:\Users\admin\anaconda3\envs\py37_tensorflow1_14\lib\site-packages\x2paddle-1.3.5-py3.7.egg\x2paddle\core\program.py", line 302, in gen_model raise e File "C:\Users\admin\anaconda3\envs\py37_tensorflow1_14\lib\site-packages\x2paddle-1.3.5-py3.7.egg\x2paddle\core\program.py", line 296, in gen_model self.dygraph2static(save_dir, input_shapes, input_types) File "C:\Users\admin\anaconda3\envs\py37_tensorflow1_14\lib\site-packages\x2paddle-1.3.5-py3.7.egg\x2paddle\core\program.py", line 568, in dygraph2static

import x2paddle_code

File "carReidOnnx2paddle\x2paddle_code.py", line 207 SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xc8 in position 39: invalid continuation byte

kouhinn commented 2 years ago

找到问题了,是paddle不支持中文目录。