未验证 提交 6c19cc7d 编写于 作者: G Guanghua Yu 提交者: GitHub

fix paddle2onnx version (#1543)

上级 c308576f
......@@ -218,11 +218,11 @@ def export_onnx(model_dir,
try:
import paddle2onnx
version = paddle2onnx.__version__
if version != '1.0.1':
os.system('python -m pip install -U paddle2onnx==1.0.1')
if version < '1.0.1':
os.system('python -m pip install -U paddle2onnx==1.0.3')
except:
from pip._internal import main
main(['install', 'paddle2onnx==1.0.1'])
main(['install', 'paddle2onnx==1.0.3'])
import paddle2onnx
paddle2onnx.command.c_paddle_to_onnx(
model_file=os.path.join(model_dir, model_filename),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册