mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #55] problem using RN50x4 - tensor sizes #50
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#50
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 @nikjetchev on GitHub (Mar 7, 2021).
Original GitHub issue: https://github.com/openai/CLIP/issues/55
Dear all,
the newly released RN50x4 model gives me an error -- but my exact same code works ok with the RN 101 or ViT-B/32 models.
What could be wrong?
perceptor, preprocess = clip.load('RN50x4', jit=True)#gives error in encode_image()
#perceptor, preprocess = clip.load('RN101', jit=True)#works OK with encode_image()
#perceptor, preprocess = clip.load('ViT-B/32', jit=True)# works OK with encode_image()
perceptor.encode_image(torch.zeros(1,3,224,224))
@jongwook commented on GitHub (Mar 8, 2021):
The RN50x4 model expects an 288x288 image input. You can use the
preprocesstransform returned byclip.loadto center-crop and resize images as the model requires.Please refer to the appendix section F of the paper for the input resolution and other hyperparameters corresponding to each model.
@nikjetchev commented on GitHub (Mar 9, 2021):
Great, thanks for the quick help, it all works now.