未验证 提交 f19835ec 编写于 作者: W WJJ1995 提交者: GitHub

fixed onnx version bug (#661)

上级 872e9eb3
...@@ -149,7 +149,9 @@ def onnx2paddle(model_path, save_dir): ...@@ -149,7 +149,9 @@ def onnx2paddle(model_path, save_dir):
try: try:
import onnx import onnx
version = onnx.version.version version = onnx.version.version
if version < '1.6.0': v0, v1, v2 = version.split('.')
version_sum = int(v0) * 100 + int(v1) * 10 + int(v2)
if version_sum < 160:
print("[ERROR] onnx>=1.6.0 is required") print("[ERROR] onnx>=1.6.0 is required")
return return
except: except:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册