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

Question or bug in blip_pretrain.py #207

Open
LiGuo12 opened this issue Apr 13, 2024 · 0 comments
Open

Question or bug in blip_pretrain.py #207

LiGuo12 opened this issue Apr 13, 2024 · 0 comments

Comments

@LiGuo12
Copy link

LiGuo12 commented Apr 13, 2024

Between lines 54-75, after "self.text_encoder = BertModel.from_pretrained('bert-base-uncased',config=encoder_config, add_pooling_layer=False)", where "encoder_config" is 'configs/bert_config.json' , the vocal_size is 31090. Next, after "self.text_encoder.resize_token_embeddings(len(self.tokenizer))", the vocal_size changes to 31092. However, "self.text_encoder_m" does not resize the vocal_size to 31092, and its vocal_size is still 31090. Thus, "self.text_encoder" and "self.text_encoder_m" have problems with "self.copy_params()".

Is it a bug? I think there should be a ""self.text_encoder_m.resize_token_embeddings(len(self.tokenizer))" after the line 67.

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

1 participant