Skip to content

Commit

Permalink
Update blip_pretrain.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Junnan Li authored Feb 15, 2022
1 parent ad5eec3 commit 073b821
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/blip_pretrain.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def __init__(self,
decoder_config.encoder_width = vision_width
self.text_decoder = BertLMHeadModel.from_pretrained('bert-base-uncased',config=decoder_config)
self.text_decoder.resize_token_embeddings(len(self.tokenizer))
tie_encoder_decoder_weights(self.text_decoder.bert,self.text_encoder,'','/attention')
tie_encoder_decoder_weights(self.text_encoder,self.text_decoder.bert,'','/attention')


def forward(self, image, caption, alpha):
Expand Down

0 comments on commit 073b821

Please sign in to comment.