Skip to content

Commit 0f05015

Browse files
Fix bug #2458 (#2459)
Summary: #2458 Pull Request resolved: #2459 Reviewed By: xuzhao9 Differential Revision: D63476542 Pulled By: kit1980 fbshipit-source-id: 01e9db9cb03d34e82a773897417df2ccda410634
1 parent 2edf80c commit 0f05015

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

torchbenchmark/models/torch_multimodal_clip/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,5 @@ def eval(self):
8787
)
8888
score = image_embedding @ text_embedding.t()
8989

90-
return self.text[torch.argmax(score)]
90+
indices = torch.argmax(score, dim=1)
91+
return [self.texts[i][indices[i].item()] for i in range(self.batch_size)]

0 commit comments

Comments
 (0)