Skip to content

Commit

Permalink
change flag_step from 5 to 10
Browse files Browse the repository at this point in the history
change flag_step from 5 to 10, ensuring the better performance.
  • Loading branch information
xiangwang1223 authored Oct 31, 2019
1 parent ce7aef2 commit ef4d452
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Model/Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,10 @@ def load_pretrained_data(args):
ret['precision'][0], ret['precision'][-1], ret['hit_ratio'][0], ret['hit_ratio'][-1],
ret['ndcg'][0], ret['ndcg'][-1])
print(perf_str)


# change flag_step from 5 to 10, ensuring the better performance.
cur_best_pre_0, stopping_step, should_stop = early_stopping(ret['recall'][0], cur_best_pre_0,
stopping_step, expected_order='acc', flag_step=5)
stopping_step, expected_order='acc', flag_step=10)

# *********************************************************
# early stopping when cur_best_pre_0 is decreasing for ten successive steps.
Expand Down

0 comments on commit ef4d452

Please sign in to comment.