Skip to content

Commit 0cef773

Browse files
author
Karan Desai
committed
Update README.md
1 parent 9421bc9 commit 0cef773

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Performance on `v1.0` val (trained on `v1.0` train):
172172

173173
| R@1 | R@5 | R@10 | MeanR | MRR |
174174
| ------ | ------ | ------ | ------ | ------ |
175-
| 0.4194 | 0.7345 | 0.8387 | 5.9876 | 0.5650 |
175+
| 0.4298 | 0.7464 | 0.8491 | 5.4874 | 0.5757 |
176176

177177

178178
Acknowledgements

utils/eval_utils.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,9 @@
33

44
def get_gt_ranks(ranks, ans_ind):
55
ans_ind = ans_ind.view(-1)
6-
num_opts = 100
7-
ranks = ranks.view(-1, num_opts)
86
gt_ranks = torch.LongTensor(ans_ind.size(0))
97
for i in range(ans_ind.size(0)):
10-
gt_binary = torch.zeros(num_opts)
11-
gt_binary[ans_ind[i]] = 1
12-
sorted_gt = gt_binary.index_select(0, ranks[i].sort()[1].cpu())
13-
gt_rank = (sorted_gt == 1).nonzero() + 1
14-
gt_ranks[i] = int(gt_rank) # gt_rank is 1x1 LongTensor
8+
gt_ranks[i] = int(ranks[i, ans_ind[i]])
159
return gt_ranks
1610

1711

0 commit comments

Comments
 (0)