From f19835ec54f5f68e9fe8f15bfc1f62b9ff266142 Mon Sep 17 00:00:00 2001 From: WJJ1995 Date: Sat, 21 Aug 2021 10:21:09 +0800 Subject: [PATCH] fixed onnx version bug (#661) --- x2paddle/convert.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x2paddle/convert.py b/x2paddle/convert.py index 5e23b01..24dd0fc 100644 --- a/x2paddle/convert.py +++ b/x2paddle/convert.py @@ -149,7 +149,9 @@ def onnx2paddle(model_path, save_dir): try: import onnx 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") return except: -- GitLab