未验证 提交 80728741 编写于 作者: G Guanghua Yu 提交者: GitHub

fix face_eval check_config (#612)

上级 b9c7aa52
...@@ -22,6 +22,7 @@ from paddle import fluid ...@@ -22,6 +22,7 @@ from paddle import fluid
from ppdet.core.workspace import load_config, merge_config, create from ppdet.core.workspace import load_config, merge_config, create
from ppdet.utils.cli import ArgsParser from ppdet.utils.cli import ArgsParser
from ppdet.utils.check import check_config
import ppdet.utils.checkpoint as checkpoint import ppdet.utils.checkpoint as checkpoint
import yaml import yaml
import logging import logging
...@@ -55,13 +56,10 @@ def save_serving_model(FLAGS, exe, feed_vars, test_fetches, infer_prog): ...@@ -55,13 +56,10 @@ def save_serving_model(FLAGS, exe, feed_vars, test_fetches, infer_prog):
def main(): def main():
cfg = load_config(FLAGS.config) cfg = load_config(FLAGS.config)
merge_config(FLAGS.opt)
check_config(cfg)
if 'architecture' in cfg:
main_arch = cfg.architecture main_arch = cfg.architecture
else:
raise ValueError("'architecture' not specified in config file.")
merge_config(FLAGS.opt)
# Use CPU for exporting inference model instead of GPU # Use CPU for exporting inference model instead of GPU
place = fluid.CPUPlace() place = fluid.CPUPlace()
......
...@@ -25,7 +25,7 @@ from collections import OrderedDict ...@@ -25,7 +25,7 @@ from collections import OrderedDict
import ppdet.utils.checkpoint as checkpoint import ppdet.utils.checkpoint as checkpoint
from ppdet.utils.cli import ArgsParser from ppdet.utils.cli import ArgsParser
from ppdet.utils.check import check_gpu from ppdet.utils.check import check_gpu, check_config
from ppdet.utils.widerface_eval_utils import get_shrink, bbox_vote, \ from ppdet.utils.widerface_eval_utils import get_shrink, bbox_vote, \
save_widerface_bboxes, save_fddb_bboxes, to_chw_bgr save_widerface_bboxes, save_fddb_bboxes, to_chw_bgr
from ppdet.core.workspace import load_config, merge_config, create from ppdet.core.workspace import load_config, merge_config, create
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册