diff --git a/fluid/ocr_recognition/.run.sh b/fluid/ocr_recognition/.run.sh new file mode 100644 index 0000000000000000000000000000000000000000..8bb5b9cca9e995d68fb18532c35ab8bdc494ceda --- /dev/null +++ b/fluid/ocr_recognition/.run.sh @@ -0,0 +1 @@ +python ctc_train.py --batch_size=128 --total_step=10000 --use_gpu=True diff --git a/fluid/ocr_recognition/.run_ce.sh b/fluid/ocr_recognition/.run_ce.sh new file mode 100644 index 0000000000000000000000000000000000000000..17d36384b02eec0345eb529a31f65fd43326f5df --- /dev/null +++ b/fluid/ocr_recognition/.run_ce.sh @@ -0,0 +1 @@ +python ctc_train.py --batch_size=128 --total_step=10000 --use_gpu=True | python _ce.py diff --git a/fluid/ocr_recognition/ctc_train.py b/fluid/ocr_recognition/ctc_train.py index dde07e51887ab6d7724f9b8893ae49479ee7b9a7..dc68cc2e2e9f6e98d2331ff926109d5df56d1df6 100644 --- a/fluid/ocr_recognition/ctc_train.py +++ b/fluid/ocr_recognition/ctc_train.py @@ -98,6 +98,10 @@ def train(args, data_reader=ctc_reader): print "\nTime: %s; Iter[%d]; Test seq error: %s.\n" % ( time.time(), iter_num, str(test_seq_error[0])) + #Note: The following logs are special for CE monitoring. + #Other situations do not need to care about these logs. + print("kpis test_seq_error %f" % test_seq_error[0]) + def save_model(args, exe, iter_num): filename = "model_%05d" % iter_num fluid.io.save_params(