提交 2ac3ec96 编写于 作者: B baiyfbupt

fix issue

上级 2c6f0b0d
......@@ -4,7 +4,7 @@
## 概述
该示例使用PaddleSlim提供的[量化压缩API](https://paddlepaddle.github.io/PaddleSlim/api/quantization_api/)检测模型进行压缩。
该示例使用PaddleSlim提供的[量化压缩API](https://paddlepaddle.github.io/PaddleSlim/api/quantization_api/)OCR模型进行压缩。
在阅读该示例前,建议您先了解以下内容:
- [OCR模型的常规训练方法](https://github.com/PaddlePaddle/PaddleOCR/blob/develop/doc/doc_ch/detection.md)
......
......@@ -179,26 +179,7 @@ def main():
program.train_eval_rec_run(config, exe, train_info_dict, eval_info_dict)
def test_reader():
logger.info(config)
train_reader = reader_main(config=config, mode="train")
import time
starttime = time.time()
count = 0
try:
for data in train_reader():
count += 1
if count % 1 == 0:
batch_time = time.time() - starttime
starttime = time.time()
logger.info("reader:", count, len(data), batch_time)
except Exception as e:
logger.info(e)
logger.info("finish reader: {}, Success!".format(count))
if __name__ == '__main__':
startup_program, train_program, place, config, train_alg_type = program.preprocess(
)
main()
# test_reader()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册