Skip to content

Commit

Permalink
Return global attentions (see huggingface#7514) (huggingface#10906)
Browse files Browse the repository at this point in the history
  • Loading branch information
gui11aume authored and Iwontbecreative committed Jul 15, 2021
1 parent 7f0c2f0 commit 887f9d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/transformers/models/longformer/modeling_longformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1786,6 +1786,7 @@ def forward(
logits=prediction_scores,
hidden_states=outputs.hidden_states,
attentions=outputs.attentions,
global_attentions=outputs.global_attentions,
)


Expand Down Expand Up @@ -1878,6 +1879,7 @@ def forward(
logits=logits,
hidden_states=outputs.hidden_states,
attentions=outputs.attentions,
global_attentions=outputs.global_attentions,
)


Expand Down Expand Up @@ -2126,6 +2128,7 @@ def forward(
logits=logits,
hidden_states=outputs.hidden_states,
attentions=outputs.attentions,
global_attentions=outputs.global_attentions,
)


Expand Down

0 comments on commit 887f9d9

Please sign in to comment.