Unverified Commit b3544e4c authored by Guillaume Filion's avatar Guillaume Filion Committed by GitHub
Browse files

Return global attentions (see #7514) (#10906)

parent 4f21e1dd
......@@ -1786,6 +1786,7 @@ class LongformerForMaskedLM(LongformerPreTrainedModel):
logits=prediction_scores,
hidden_states=outputs.hidden_states,
attentions=outputs.attentions,
global_attentions=outputs.global_attentions,
)
......@@ -1878,6 +1879,7 @@ class LongformerForSequenceClassification(LongformerPreTrainedModel):
logits=logits,
hidden_states=outputs.hidden_states,
attentions=outputs.attentions,
global_attentions=outputs.global_attentions,
)
......@@ -2126,6 +2128,7 @@ class LongformerForTokenClassification(LongformerPreTrainedModel):
logits=logits,
hidden_states=outputs.hidden_states,
attentions=outputs.attentions,
global_attentions=outputs.global_attentions,
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment