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

fix check_version in some script (#670)

上级 e3f1384d
......@@ -32,7 +32,7 @@ from ppdet.data.reader import create_reader
from ppdet.utils.eval_utils import parse_fetches, eval_results, eval_run
from ppdet.utils.stats import TrainingStats
from ppdet.utils.cli import ArgsParser
from ppdet.utils.check import check_gpu, check_config
from ppdet.utils.check import check_gpu, check_version, check_config
import ppdet.utils.checkpoint as checkpoint
import logging
......@@ -134,6 +134,7 @@ def main():
check_config(cfg)
# check if set use_gpu=True in paddlepaddle cpu version
check_gpu(cfg.use_gpu)
check_version()
main_arch = cfg.architecture
......
......@@ -35,7 +35,7 @@ from ppdet.data.reader import create_reader
from ppdet.utils.eval_utils import parse_fetches, eval_results, eval_run
from ppdet.utils.stats import TrainingStats
from ppdet.utils.cli import ArgsParser
from ppdet.utils.check import check_gpu, check_config
from ppdet.utils.check import check_gpu, check_version, check_config
import ppdet.utils.checkpoint as checkpoint
import logging
......@@ -123,6 +123,7 @@ def main():
check_config(cfg)
# check if set use_gpu=True in paddlepaddle cpu version
check_gpu(cfg.use_gpu)
check_version()
main_arch = cfg.architecture
......
......@@ -27,7 +27,7 @@ from paddle import fluid
from ppdet.core.workspace import load_config, merge_config, create
from ppdet.utils.cli import ArgsParser
import ppdet.utils.checkpoint as checkpoint
from ppdet.utils.check import check_config
from ppdet.utils.check import check_config, check_version
from paddleslim.prune import Pruner
from paddleslim.analysis import flops
......@@ -82,6 +82,7 @@ def main():
cfg = load_config(FLAGS.config)
merge_config(FLAGS.opt)
check_config(cfg)
check_version()
main_arch = cfg.architecture
......
......@@ -27,7 +27,7 @@ from paddle import fluid
from ppdet.core.workspace import load_config, merge_config, create
from ppdet.utils.cli import ArgsParser
import ppdet.utils.checkpoint as checkpoint
from ppdet.utils.check import check_config
from ppdet.utils.check import check_config, check_version
from tools.export_model import prune_feed_vars
import logging
......@@ -57,6 +57,7 @@ def main():
cfg = load_config(FLAGS.config)
merge_config(FLAGS.opt)
check_config(cfg)
check_version()
main_arch = cfg.architecture
......
......@@ -53,6 +53,7 @@ def main():
cfg = load_config(FLAGS.config)
merge_config(FLAGS.opt)
check_config(cfg)
check_version()
main_arch = cfg.architecture
......
......@@ -28,7 +28,7 @@ from paddle import fluid
from ppdet.core.workspace import load_config, merge_config, create
from ppdet.utils.cli import ArgsParser
import ppdet.utils.checkpoint as checkpoint
from ppdet.utils.check import check_config
from ppdet.utils.check import check_config, check_version
import yaml
import logging
from collections import OrderedDict
......@@ -176,6 +176,8 @@ def main():
merge_config(FLAGS.opt)
check_config(cfg)
check_version()
main_arch = cfg.architecture
# Use CPU for exporting inference model instead of GPU
......
......@@ -22,7 +22,7 @@ from paddle import fluid
from ppdet.core.workspace import load_config, merge_config, create
from ppdet.utils.cli import ArgsParser
from ppdet.utils.check import check_config
from ppdet.utils.check import check_config, check_version
import ppdet.utils.checkpoint as checkpoint
import yaml
import logging
......@@ -58,6 +58,7 @@ def main():
cfg = load_config(FLAGS.config)
merge_config(FLAGS.opt)
check_config(cfg)
check_version()
main_arch = cfg.architecture
......
......@@ -30,7 +30,7 @@ from collections import OrderedDict
import ppdet.utils.checkpoint as checkpoint
from ppdet.utils.cli import ArgsParser
from ppdet.utils.check import check_gpu, check_config
from ppdet.utils.check import check_gpu, check_version, check_config
from ppdet.utils.widerface_eval_utils import get_shrink, bbox_vote, \
save_widerface_bboxes, save_fddb_bboxes, to_chw_bgr
from ppdet.core.workspace import load_config, merge_config, create
......@@ -219,6 +219,7 @@ def main():
check_config(cfg)
# check if set use_gpu=True in paddlepaddle cpu version
check_gpu(cfg.use_gpu)
check_version()
main_arch = cfg.architecture
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册