From fdc47a42388e47deb430a4871678705698879bf5 Mon Sep 17 00:00:00 2001 From: Yibing Liu Date: Wed, 7 Feb 2018 10:08:35 +0000 Subject: [PATCH] Remove redundant if condition --- fluid/DeepASR/infer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fluid/DeepASR/infer.py b/fluid/DeepASR/infer.py index 74ac6311..adb390a0 100644 --- a/fluid/DeepASR/infer.py +++ b/fluid/DeepASR/infer.py @@ -67,13 +67,13 @@ def infer(args): """ Get one batch of feature data and predicts labels for each sample. """ - if args.model_save_path is None or \ - not os.path.exists(args.model_save_path): + if not os.path.exists(args.model_save_path): raise IOError("Invalid model path!") place = fluid.CUDAPlace(0) if args.device == 'GPU' else fluid.CPUPlace() exe = fluid.Executor(place) + # load model [infer_program, feed_dicts, fetch_targets] = fluid.io.load_inference_model(args.model_save_path, exe) -- GitLab