From c6a0e8d79da3556e32984755c62e3195c563586f Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Mon, 8 Jun 2020 12:43:34 +0000 Subject: [PATCH] fix rec doc typo --- doc/recognition.md | 2 +- tools/program.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/recognition.md b/doc/recognition.md index 004487f9..45fa74ab 100644 --- a/doc/recognition.md +++ b/doc/recognition.md @@ -209,7 +209,7 @@ infer_img: doc/imgs_words/en/word_1.png ``` # 预测中文结果 -python3 tools/infer_rec.py -c configs/rec/rec_chinese_lite_train.yml -o Global.checkpoints={path/to/weights}/best_accuracy TestReader.infer_img=doc/imgs_words/ch/word_1.jpg +python3 tools/infer_rec.py -c configs/rec/rec_chinese_lite_train.yml -o Global.checkpoints={path/to/weights}/best_accuracy Global.infer_img=doc/imgs_words/ch/word_1.jpg ``` 预测图片: diff --git a/tools/program.py b/tools/program.py index 18a4ab7d..30e9d737 100755 --- a/tools/program.py +++ b/tools/program.py @@ -114,7 +114,7 @@ def merge_config(config): global_config[key] = value else: sub_keys = key.split('.') - assert (sub_keys[0] in global_config) + assert (sub_keys[0] in global_config), "the sub_keys can only be one of global_config: {}, but get: {}, please check your running command".format(global_config.keys(), sub_keys[0]) cur = global_config[sub_keys[0]] for idx, sub_key in enumerate(sub_keys[1:]): assert (sub_key in cur) -- GitLab