mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[GH-ISSUE #473] out proj weight typo fix #400
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#400
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 @louiswang524 on GitHub (Nov 5, 2024).
Original GitHub issue: https://github.com/openai/CLIP/issues/473
Here is a typo for initialize_parameter() function. The
output_proj.weightshould beoutput_proj_weightgithub.com/openai/CLIP@dcba3cb2e2/clip/model.py (L321)@99991 commented on GitHub (Jan 23, 2025):
What makes you think so?
@louiswang524 commented on GitHub (Jan 28, 2025):
@99991 before it is a parameter defined here
github.com/openai/CLIP@dcba3cb2e2/clip/model.py (L85)@99991 commented on GitHub (Jan 29, 2025):
The line from your first message initializes the member
block.attn.out_proj.weightofself.transformer.resblocksgithub.com/openai/CLIP@dcba3cb2e2/clip/model.py (L321)github.com/openai/CLIP@dcba3cb2e2/clip/model.py (L319)github.com/openai/CLIP@dcba3cb2e2/clip/model.py (L282)github.com/openai/CLIP@dcba3cb2e2/clip/model.py (L200)github.com/openai/CLIP@dcba3cb2e2/clip/model.py (L175)github.com/pytorch/pytorch@3f77002b96/torch/nn/modules/activation.py (L1102)But in your last message, you highlight
self.c_proj.weight, which is not a member ofself.transformer.resblocks. Instead, it is a member ofAttentionPool2d, which is only used inModifiedResNet, i.e.self.visualofCLIP.github.com/openai/CLIP@dcba3cb2e2/clip/model.py (L85)github.com/openai/CLIP@dcba3cb2e2/clip/model.py (L58C7-L58C22)github.com/openai/CLIP@dcba3cb2e2/clip/model.py (L127)github.com/openai/CLIP@dcba3cb2e2/clip/model.py (L264)