Skip to content

Commit

Permalink
fix eval_rec
Browse files Browse the repository at this point in the history
  • Loading branch information
tink2123 committed May 25, 2020
1 parent dd0112f commit 552d427
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/eval_utils/eval_rec_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def eval_rec_run(exe, config, eval_info_dict, mode):
total_sample_num = 0
total_acc_num = 0
total_batch_num = 0
if mode == "eval":
if mode == "test":
is_remove_duplicate = False
else:
is_remove_duplicate = True
Expand Down Expand Up @@ -91,11 +91,11 @@ def test_rec_benchmark(exe, config, eval_info_dict):
total_correct_number = 0
eval_data_acc_info = {}
for eval_data in eval_data_list:
config['TestReader']['lmdb_sets_dir'] = \
config['EvalReader']['lmdb_sets_dir'] = \
eval_data_dir + "/" + eval_data
eval_reader = reader_main(config=config, mode="test")
eval_reader = reader_main(config=config, mode="eval")
eval_info_dict['reader'] = eval_reader
metrics = eval_rec_run(exe, config, eval_info_dict, "test")
metrics = eval_rec_run(exe, config, eval_info_dict, "eval")
total_evaluation_data_number += metrics['total_sample_num']
total_correct_number += metrics['total_acc_num']
eval_data_acc_info[eval_data] = metrics
Expand Down

0 comments on commit 552d427

Please sign in to comment.