Update modeling_florence2.py
Browse files- modeling_florence2.py +2 -2
modeling_florence2.py
CHANGED
@@ -2067,8 +2067,8 @@ class Florence2LanguageForConditionalGeneration(Florence2LanguagePreTrainedModel
|
|
2067 |
def __init__(self, config: Florence2LanguageConfig):
|
2068 |
super().__init__(config)
|
2069 |
self.model = Florence2LanguageModel(config)
|
2070 |
-
self.register_buffer("final_logits_bias", torch.zeros((1,
|
2071 |
-
self.lm_head = nn.Linear(config.d_model,
|
2072 |
|
2073 |
# Initialize weights and apply final processing
|
2074 |
self.post_init()
|
|
|
2067 |
def __init__(self, config: Florence2LanguageConfig):
|
2068 |
super().__init__(config)
|
2069 |
self.model = Florence2LanguageModel(config)
|
2070 |
+
self.register_buffer("final_logits_bias", torch.zeros((1, 1)))
|
2071 |
+
self.lm_head = nn.Linear(config.d_model, 1, bias=False)
|
2072 |
|
2073 |
# Initialize weights and apply final processing
|
2074 |
self.post_init()
|