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

关于编码器 #80

Open
SnailForce opened this issue Oct 10, 2024 · 3 comments
Open

关于编码器 #80

SnailForce opened this issue Oct 10, 2024 · 3 comments

Comments

@SnailForce
Copy link

您知道如何把bigG_encoder = bigG_model.encode_text_full和vitL_encoder = vitl_model.encode_text_full这两个函数改成常规的编码器形式吗,函数形式与一些现有的框架不是很适配,点开之后发现是self.token_embedding = nn.Embedding(vocab_size, width),不知道如何修改?

@beichenzbc
Copy link
Owner

那您个可以不加bigG_encoder = bigG_model.encode_text_full,但是在之后通过bigG_encoder(input)传参的函数需要改成bigG_encoder.encode_text_full

@SnailForce
Copy link
Author

谢谢,那对应的vitL_encoder对应的部分应该如何修改,也是同样的做法吗

@beichenzbc
Copy link
Owner

嗯嗯是

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