We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Why is the label embedding in stage2 initialized by nn.embedding instead of CLIP text_encoder?
self.token_embedding = nn.Embedding(args.vocab_size, args.transformer_width) self.label_emb = torch.zeros((len(self.name_lens), max(self.name_lens), self.transformer_width)).to(self.device) for i, embed in enumerate(self.token_embedding(self.label_token)): self.label_emb[i][:self.name_lens[i]] = embed[4:4+self.name_lens[i]].clone().detach()
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for your attention and problem. During the second stage, the token embeddings of label text are fixed. So, we use a nn.Embedding to save them.
I will close the issue. If you still have any problems, plz tell me.
Best, Sunan.
Sorry, something went wrong.
No branches or pull requests
Why is the label embedding in stage2 initialized by nn.embedding instead of CLIP text_encoder?
The text was updated successfully, but these errors were encountered: