xinyu1205 commited on
Commit
7b8f1e0
1 Parent(s): f7d54e4

Update models/tag2text.py

Browse files
Files changed (1) hide show
  1. models/tag2text.py +1 -1
models/tag2text.py CHANGED
@@ -96,7 +96,7 @@ class Tag2Text_Caption(nn.Module):
96
 
97
  q2l_config = BertConfig.from_json_file('configs/q2l_config.json')
98
  q2l_config.encoder_width = vision_width
99
- self.vision_multi = BertModel.from_pretrained('bert-base-uncased',config=q2l_config, add_pooling_layer=False)
100
  self.vision_multi.resize_token_embeddings(len(self.tokenizer))
101
  self.label_embed = nn.Embedding(self.num_class, q2l_config.hidden_size)
102
  self.fc = GroupWiseLinear(self.num_class, num_features, bias=True)
 
96
 
97
  q2l_config = BertConfig.from_json_file('configs/q2l_config.json')
98
  q2l_config.encoder_width = vision_width
99
+ self.vision_multi = BertModel.from_pretrained(config=q2l_config, add_pooling_layer=False)
100
  self.vision_multi.resize_token_embeddings(len(self.tokenizer))
101
  self.label_embed = nn.Embedding(self.num_class, q2l_config.hidden_size)
102
  self.fc = GroupWiseLinear(self.num_class, num_features, bias=True)