Skip to content

Commit

Permalink
Merge branch 'main' of github.com:salesforce/BLIP into main
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Feb 18, 2022
2 parents 23af1be + 073b821 commit 85f8057
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 85f8057

Please sign in to comment.