Spaces:
Sleeping
Sleeping
Update models/tag2text.py
Browse files- 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
|
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(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)
|