diff --git a/README.md b/README.md index 5eb9ed8fb43f132511e82bd56fa9831eb407c9a8..2035ea2e473871eb60c091c31d7de7e1d6611420 100644 --- a/README.md +++ b/README.md @@ -246,7 +246,8 @@ PaddleOCR文本识别算法的训练和使用请参考文档教程中[文本识 ## 许可证书 本项目的发布受Apache 2.0 license许可认证。 -## 如何贡献代码 +## 贡献代码 我们非常欢迎你为PaddleOCR贡献代码,也十分感谢你的反馈。 - 非常感谢 [Khanh Tran](https://github.com/xxxpsyduck) 贡献了英文文档。 +- 非常感谢 [zhangxin](https://github.com/ZhangXinNan)([Blog](https://blog.csdn.net/sdlypyzq)) 贡献新的可视化方式、添加.gitgnore、处理手动设置PYTHONPATH环境变量的问题 diff --git a/README_en.md b/README_en.md index c64b65c4cb28d5010d340e5bc1f7605c437a2300..219029968a0e950513cf9135004b2de5203d7117 100644 --- a/README_en.md +++ b/README_en.md @@ -255,3 +255,4 @@ This project is released under max_text_length: + logger.info( + "Warning in ppocr/data/rec/img_tools.py:line106: Wrong data type." + "Excepted string with length between 0 and {}, but " + "got '{}' ".format(max_text_length, label)) return None else: if loss_type == "ctc": diff --git a/tools/program.py b/tools/program.py index 30e9d7379bd07a0570c613ea25d1b440ed8bc682..3c71065a167fa18fc9d00535dace97737904b74d 100755 --- a/tools/program.py +++ b/tools/program.py @@ -114,7 +114,10 @@ def merge_config(config): global_config[key] = value else: sub_keys = key.split('.') - 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]) + 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) @@ -177,7 +180,6 @@ def build(config, main_prog, startup_prog, mode): optimizer.minimize(opt_loss) opt_loss_name = opt_loss.name global_lr = optimizer._global_learning_rate() - global_lr.persistable = True fetch_name_list.insert(0, "lr") fetch_varname_list.insert(0, global_lr.name) return (dataloader, fetch_name_list, fetch_varname_list, opt_loss_name)