mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #325] Number of dims don't match in permute #281
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openai/CLIP#281
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @shantanu778 on GitHub (Feb 20, 2023).
Original GitHub issue: https://github.com/openai/CLIP/issues/325
In my task, I want to calculate the similarity score of 1 image with 22 texts. If I pass images and texts without batch, it will work properly.
But if I pass as batch it's showing the following error:
Input Image Size: (1, 3, 224, 224) (batch_size, n_channel, image width, image height)
Input text size: (1, 22, 77)(batch_size, n_txt, text_length)
@Angtrim commented on GitHub (Feb 24, 2023):
I got the same issue!
Did you manage to solve it?
@Angtrim commented on GitHub (Feb 28, 2023):
Apparently the model is built to get "flattened" batched classes (or at least it seems to me).
So, in order to get classify a single image over multiple batches of classes I've implemented the following script that uses the cosine similarity to do the softmax:
@JakobWong commented on GitHub (Nov 18, 2023):
Same issue here. Any solutions so far?