diff --git a/tools/train.py b/tools/train.py index 90344389b476a2747c9dfd7d90d5feb474626465..d552f2152b91e0a01f1fc377ac0f90a02a2a0571 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()