提交 f1f51579 编写于 作者: M mamingjie-China

fix the bug

上级 a015063b
......@@ -189,14 +189,14 @@ def main():
assert args.framework is not None, "--framework is not defined(support tensorflow/caffe/onnx)"
assert args.save_dir is not None, "--save_dir is not defined"
# try:
# import paddle
# v0, v1, v2 = paddle.__version__.split('.')
# if int(v0) != 1 or int(v1) < 5:
# print("paddlepaddle>=1.5.0 is required")
# return
# except:
# print("paddlepaddle not installed, use \"pip install paddlepaddle\"")
try:
import paddle
v0, v1, v2 = paddle.__version__.split('.')
if int(v0) != 1 or int(v1) < 5:
print("paddlepaddle>=1.5.0 is required")
return
except:
print("paddlepaddle not installed, use \"pip install paddlepaddle\"")
if args.framework == "tensorflow":
assert args.model is not None, "--model should be defined while translating tensorflow model"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册