Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

out proj weight typo fix #473

Open
louiswang524 opened this issue Nov 5, 2024 · 3 comments
Open

out proj weight typo fix #473

louiswang524 opened this issue Nov 5, 2024 · 3 comments

Comments

@louiswang524
Copy link

Here is a typo for initialize_parameter() function. The output_proj.weight should be output_proj_weight

nn.init.normal_(block.attn.out_proj.weight, std=proj_std)

@99991
Copy link

99991 commented Jan 23, 2025

What makes you think so?

@louiswang524
Copy link
Author

What makes you think so?

@99991 before it is a parameter defined here

out_proj_weight=self.c_proj.weight,

@99991
Copy link

99991 commented Jan 29, 2025

The line from your first message initializes the member block.attn.out_proj.weight of self.transformer.resblocks

But in your last message, you highlight self.c_proj.weight, which is not a member of self.transformer.resblocks. Instead, it is a member of AttentionPool2d, which is only used in ModifiedResNet, i.e. self.visual of CLIP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants