未验证 提交 210a789f 编写于 作者: Z zhouzj 提交者: GitHub

adapt x2paddle version (#1650)

上级 868df3ed
...@@ -125,13 +125,13 @@ def load_onnx_model(model_path, ...@@ -125,13 +125,13 @@ def load_onnx_model(model_path,
version = x2paddle.__version__ version = x2paddle.__version__
v0, v1, v2 = version.split('.') v0, v1, v2 = version.split('.')
version_sum = int(v0) * 100 + int(v1) * 10 + int(v2) version_sum = int(v0) * 100 + int(v1) * 10 + int(v2)
if version_sum < 139: if version_sum != 139:
_logger.warning( _logger.warning(
"x2paddle>=1.3.9 is required, please use \"pip install x2paddle\"." "x2paddle==1.3.9 is required, please use \"pip install x2paddle==1.3.9\"."
) )
os.system('python -m pip install -U x2paddle') os.system('python -m pip install -U x2paddle==1.3.9')
except: except:
os.system('python -m pip install -U x2paddle') os.system('python -m pip install -U x2paddle==1.3.9')
# check onnx installation and version # check onnx installation and version
try: try:
pkg.require('onnx') pkg.require('onnx')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册