Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ssdasgupta committed Apr 28, 2019
1 parent dcd53a7 commit 085b30a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions result_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -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('------------------------------------------')

0 comments on commit 085b30a

Please sign in to comment.