提交 f9d366f8 编写于 作者: C channingss

fix torch bug

上级 b6e359f1
......@@ -110,6 +110,17 @@ def onnx2paddle(model_path, save_dir):
except:
print("onnx is not installed, use \"pip install onnx==1.5.0\".")
return
try:
import torch
version = torch.__version__
if '1.1.0' not in version:
print("your model have dynamic graph, torch==1.1.0 is required")
return
except:
print(
"your model have dynamic graph, we use caff2 to inference graph, please use \"pip install torch==1.1.0\"."
)
return
print("Now translating model from onnx to paddle.")
from x2paddle.decoder.onnx_decoder import ONNXDecoder
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册