diff --git a/result_eval.py b/result_eval.py index 43f61c0..287f85a 100755 --- a/result_eval.py +++ b/result_eval.py @@ -67,10 +67,10 @@ ranks_tail.append(final_out_tail[i][int(row.split()[2])]) print('Epoch {} : test_tail rank {}\t test_head rank {}'.format(k ,np.mean(np.array(ranks_tail))+1, np.mean(np.array(ranks_head))+1)) - if eval_mode == 'valid': - if np.mean(np.array(rank_tail)) < best_rank: - best_rank = np.mean(np.array(rank_tail)) + if args.eval_mode == 'valid': + if np.mean(np.array(ranks_tail))+1 < best_rank: + best_rank = np.mean(np.array(ranks_tail)) best_epoch = k print('------------------------------------------') - print('best validation rank till now {} at Epoch {}'. format(best_rank, best_epoch)) + print('Best Validation rank till now {} at Epoch {}'. format(best_rank, best_epoch)) print('------------------------------------------')