diff --git a/configs/rec/rec_mv3_none_bilstm_ctc.yml b/configs/rec/rec_mv3_none_bilstm_ctc.yml index ea1046380093c5635dcfcbf90761bedcd5320e92..11a09ee927492154c46f82add1bcfae7c2bb787e 100755 --- a/configs/rec/rec_mv3_none_bilstm_ctc.yml +++ b/configs/rec/rec_mv3_none_bilstm_ctc.yml @@ -4,7 +4,7 @@ Global: epoch_num: 72 log_smooth_window: 20 print_batch_step: 10 - save_model_dir: output/rec + save_model_dir: output/rec_CRNN save_epoch_step: 3 eval_batch_step: 2000 train_batch_size_per_card: 256 diff --git a/configs/rec/rec_mv3_none_none_ctc.yml b/configs/rec/rec_mv3_none_none_ctc.yml index 06622783976f262c43e256e878bcbc2eec920e4e..bbbb6d1fabacbebaf1481260f34ef0e2cfed97f6 100755 --- a/configs/rec/rec_mv3_none_none_ctc.yml +++ b/configs/rec/rec_mv3_none_none_ctc.yml @@ -4,7 +4,7 @@ Global: epoch_num: 72 log_smooth_window: 20 print_batch_step: 10 - save_model_dir: output/rec + save_model_dir: output/rec_Rosetta save_epoch_step: 3 eval_batch_step: 2000 train_batch_size_per_card: 256 diff --git a/configs/rec/rec_mv3_tps_bilstm_attn.yml b/configs/rec/rec_mv3_tps_bilstm_attn.yml index f5ba60d95af6635534adf5bffd3307cd4b7b70c8..03a2e901b4997a5cec0e01756b69b1fa0d04511b 100755 --- a/configs/rec/rec_mv3_tps_bilstm_attn.yml +++ b/configs/rec/rec_mv3_tps_bilstm_attn.yml @@ -4,7 +4,7 @@ Global: epoch_num: 72 log_smooth_window: 20 print_batch_step: 10 - save_model_dir: output/rec + save_model_dir: output/rec_RARE save_epoch_step: 3 eval_batch_step: 2000 train_batch_size_per_card: 256 diff --git a/configs/rec/rec_mv3_tps_bilstm_ctc.yml b/configs/rec/rec_mv3_tps_bilstm_ctc.yml index 132320bc74ae4da37a56f74f2b4ca8c1b780da36..47247b723a0cb3a145d6e87a3d76b1a8dcf1ea21 100755 --- a/configs/rec/rec_mv3_tps_bilstm_ctc.yml +++ b/configs/rec/rec_mv3_tps_bilstm_ctc.yml @@ -4,7 +4,7 @@ Global: epoch_num: 72 log_smooth_window: 20 print_batch_step: 10 - save_model_dir: output/rec + save_model_dir: output/rec_STARNet save_epoch_step: 3 eval_batch_step: 2000 train_batch_size_per_card: 256 diff --git a/configs/rec/rec_r34_vd_none_bilstm_ctc.yml b/configs/rec/rec_r34_vd_none_bilstm_ctc.yml index b784c7f89847e91a8b650df5db9c7ecd54456548..1018193611855dd22ad54fb8fbc70b7f47d89c33 100755 --- a/configs/rec/rec_r34_vd_none_bilstm_ctc.yml +++ b/configs/rec/rec_r34_vd_none_bilstm_ctc.yml @@ -4,7 +4,7 @@ Global: epoch_num: 72 log_smooth_window: 20 print_batch_step: 10 - save_model_dir: output/rec + save_model_dir: output/rec_CRNN save_epoch_step: 3 eval_batch_step: 2000 train_batch_size_per_card: 256 diff --git a/configs/rec/rec_r34_vd_none_none_ctc.yml b/configs/rec/rec_r34_vd_none_none_ctc.yml index 9d42e6d15b6b8d6888d6223880d00c37c8285c4e..ff4c57634aa12e6bbd88905a038260c75489d8f3 100755 --- a/configs/rec/rec_r34_vd_none_none_ctc.yml +++ b/configs/rec/rec_r34_vd_none_none_ctc.yml @@ -4,7 +4,7 @@ Global: epoch_num: 72 log_smooth_window: 20 print_batch_step: 10 - save_model_dir: output/rec + save_model_dir: output/rec_Rosetta save_epoch_step: 3 eval_batch_step: 2000 train_batch_size_per_card: 256 diff --git a/configs/rec/rec_r34_vd_tps_bilstm_attn.yml b/configs/rec/rec_r34_vd_tps_bilstm_attn.yml index a77e457b48c6f8801dbc2037d0c77fcf1320cf9d..4d96e9e72927e3822137bf95e89164cc33b41db7 100755 --- a/configs/rec/rec_r34_vd_tps_bilstm_attn.yml +++ b/configs/rec/rec_r34_vd_tps_bilstm_attn.yml @@ -4,7 +4,7 @@ Global: epoch_num: 72 log_smooth_window: 20 print_batch_step: 10 - save_model_dir: output/rec + save_model_dir: output/rec_RARE save_epoch_step: 3 eval_batch_step: 2000 train_batch_size_per_card: 256 diff --git a/configs/rec/rec_r34_vd_tps_bilstm_ctc.yml b/configs/rec/rec_r34_vd_tps_bilstm_ctc.yml index 3768aa47c9b6e915f37b663eff6c2f4929dc2d49..844721a2e44019382682e76d4f3f40954eaebc6b 100755 --- a/configs/rec/rec_r34_vd_tps_bilstm_ctc.yml +++ b/configs/rec/rec_r34_vd_tps_bilstm_ctc.yml @@ -4,7 +4,7 @@ Global: epoch_num: 72 log_smooth_window: 20 print_batch_step: 10 - save_model_dir: output/rec + save_model_dir: output/rec_STARNet save_epoch_step: 3 eval_batch_step: 2000 train_batch_size_per_card: 256 diff --git a/tools/program.py b/tools/program.py index a35fe6c9555a2c0e4efe4d16d3d756f6d30c31d8..6c9e9904c296129708b5cbb8eb97c196cb4c4784 100755 --- a/tools/program.py +++ b/tools/program.py @@ -284,9 +284,7 @@ def train_eval_rec_run(config, exe, train_info_dict, eval_info_dict): eval_batch_step = config['Global']['eval_batch_step'] save_epoch_step = config['Global']['save_epoch_step'] save_model_dir = config['Global']['save_model_dir'] - if save_model_dir[-1] == "/": - save_model_dir = save_model_dir[:-1] - if not os.path.exists(save_model_dir + config['Global']['algorithm']): + if not os.path.exists(save_model_dir): os.makedirs(save_model_dir) train_stats = TrainingStats(log_smooth_window, ['loss', 'acc']) best_eval_acc = -1