提交 10fa9405 编写于 作者: W wuyefeilin 提交者: Zeyu Chen

Add TEST.TEST_MODEL path validation (#134)

* update solver.py and model_builder.py

* update solver.py

* update infer.py

* update model_builder.py for fitting different aug_method

* update model_builder.py

* update model_builder.py

* update export process

* save best model

* update train.py

* update train.py

* update train.py

* eval for last epoch model

* check model path

* check TEST.TEST_MODEL
上级 2a2f5756
...@@ -111,6 +111,9 @@ def evaluate(cfg, ckpt_dir=None, use_gpu=False, use_mpio=False, **kwargs): ...@@ -111,6 +111,9 @@ def evaluate(cfg, ckpt_dir=None, use_gpu=False, use_mpio=False, **kwargs):
ckpt_dir = cfg.TEST.TEST_MODEL if not ckpt_dir else ckpt_dir ckpt_dir = cfg.TEST.TEST_MODEL if not ckpt_dir else ckpt_dir
if not os.path.exists(ckpt_dir):
raise ValueError('The TEST.TEST_MODEL {} is not found'.format(ckpt_dir))
if ckpt_dir is not None: if ckpt_dir is not None:
print('load test model:', ckpt_dir) print('load test model:', ckpt_dir)
fluid.io.load_params(exe, ckpt_dir, main_program=test_prog) fluid.io.load_params(exe, ckpt_dir, main_program=test_prog)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册