From 036164709492267cf29d8cce7c968ccc64dc8939 Mon Sep 17 00:00:00 2001 From: littletomatodonkey <2120160898@bit.edu.cn> Date: Sat, 21 Nov 2020 22:11:07 +0800 Subject: [PATCH] fix logg (#1182) --- tools/train.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/train.py b/tools/train.py index 90344389..d552f215 100755 --- a/tools/train.py +++ b/tools/train.py @@ -120,7 +120,8 @@ def test_reader(): if count % 1 == 0: batch_time = time.time() - starttime starttime = time.time() - logger.info("reader:", count, len(data), batch_time) + logger.info("[reader]count: {}, data length: {}, time: {}". + format(count, len(data), batch_time)) except Exception as e: logger.info(e) logger.info("finish reader: {}, Success!".format(count)) @@ -130,5 +131,7 @@ if __name__ == '__main__': enable_static_mode() startup_program, train_program, place, config, train_alg_type = program.preprocess( ) + # run the train process main() -# test_reader() + # if you want to check the reader, you can comment `main` and run test_reader + # test_reader()