diff --git a/README.md b/README.md index 5eb9ed8f..2035ea2e 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 c64b65c4..21902996 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 30e9d737..3c71065a 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)