Skip to content

Commit

Permalink
Fix bug #2458 (#2459)
Browse files Browse the repository at this point in the history
Summary:
#2458

Pull Request resolved: #2459

Reviewed By: xuzhao9

Differential Revision: D63476542

Pulled By: kit1980

fbshipit-source-id: 01e9db9cb03d34e82a773897417df2ccda410634
  • Loading branch information
ostrowskimarcin authored and facebook-github-bot committed Sep 28, 2024
1 parent 2edf80c commit 0f05015
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torchbenchmark/models/torch_multimodal_clip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,5 @@ def eval(self):
)
score = image_embedding @ text_embedding.t()

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

0 comments on commit 0f05015

Please sign in to comment.