[GH-ISSUE #414] finetuning rn50x64 model, encode_image error #353

Open
opened 2026-10-31 21:14:17 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @forminju on GitHub (Dec 30, 2023).
Original GitHub issue: https://github.com/openai/CLIP/issues/414

I got problem when finetuning RN 50x64 model

File "/home/student/minju/CLIP/lib/python3.8/site-packages/clip/model.py", line 71, in forward
x = x + self.positional_embedding[:, None, :].to(x.dtype) # (HW+1)NC
RuntimeError: The size of tensor a (50) must match the size of tensor b (197) at non-singleton dimension 0
like this. anyone know how to fix this problem?

Originally created by @forminju on GitHub (Dec 30, 2023). Original GitHub issue: https://github.com/openai/CLIP/issues/414 I got problem when finetuning RN 50x64 model File "/home/student/minju/CLIP/lib/python3.8/site-packages/clip/model.py", line 71, in forward `` x = x + self.positional_embedding[:, None, :].to(x.dtype) # (HW+1)NC`` RuntimeError: `The size of tensor a (50) must match the size of tensor b (197) at non-singleton dimension 0 ` like this. anyone know how to fix this problem?
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openai/CLIP#353
No description provided.