未验证 提交 da0e1eed 编写于 作者: Y yiyinggang 提交者: GitHub

Fix bug when executing eval.py with CPU & fix some grammatical mistakes (#2150)

* Update eval.py

* Update download.py
上级 de14eef0
...@@ -226,7 +226,7 @@ def _dataset_exists(path, annotation, image_dir): ...@@ -226,7 +226,7 @@ def _dataset_exists(path, annotation, image_dir):
Check if user define dataset exists Check if user define dataset exists
""" """
if not osp.exists(path): if not osp.exists(path):
logger.debug("Config dataset_dir {} is not exits, " logger.debug("Config dataset_dir {} does not exist, "
"dataset config is not valid".format(path)) "dataset config is not valid".format(path))
return False return False
......
...@@ -244,14 +244,14 @@ def _dataset_exists(path, annotation, image_dir): ...@@ -244,14 +244,14 @@ def _dataset_exists(path, annotation, image_dir):
Check if user define dataset exists Check if user define dataset exists
""" """
if not osp.exists(path): if not osp.exists(path):
logger.debug("Config dataset_dir {} is not exits, " logger.debug("Config dataset_dir {} does not exist, "
"dataset config is not valid".format(path)) "dataset config is not valid".format(path))
return False return False
if annotation: if annotation:
annotation_path = osp.join(path, annotation) annotation_path = osp.join(path, annotation)
if not osp.exists(annotation_path): if not osp.exists(annotation_path):
logger.error("Config dataset_dir {} is not exits!".format(path)) logger.error("Config anno_path {} does not exist!".format(annotation_path))
if not osp.isfile(annotation_path): if not osp.isfile(annotation_path):
logger.warning("Config annotation {} is not a " logger.warning("Config annotation {} is not a "
...@@ -261,7 +261,7 @@ def _dataset_exists(path, annotation, image_dir): ...@@ -261,7 +261,7 @@ def _dataset_exists(path, annotation, image_dir):
if image_dir: if image_dir:
image_path = osp.join(path, image_dir) image_path = osp.join(path, image_dir)
if not osp.exists(image_path): if not osp.exists(image_path):
logger.warning("Config dataset_dir {} is not exits!".format(path)) logger.warning("Config image_dir {} does not exist!".format(image_path))
if not osp.isdir(image_path): if not osp.isdir(image_path):
logger.warning("Config image_dir {} is not a " logger.warning("Config image_dir {} is not a "
......
...@@ -69,7 +69,7 @@ def main(): ...@@ -69,7 +69,7 @@ def main():
elif use_xpu: elif use_xpu:
place = fluid.XPUPlace(0) place = fluid.XPUPlace(0)
else: else:
place = CPUPlace() place = fluid.CPUPlace()
exe = fluid.Executor(place) exe = fluid.Executor(place)
# build program # build program
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册