Jackmin108
commited on
Commit
•
f713825
1
Parent(s):
84441b5
Update modeling_bert.py
Browse files- modeling_bert.py +1 -1
modeling_bert.py
CHANGED
@@ -431,7 +431,7 @@ class JinaBertSelfAttention(nn.Module):
|
|
431 |
context_layer = context_layer.view(new_context_layer_shape)
|
432 |
|
433 |
outputs = (
|
434 |
-
(context_layer,
|
435 |
)
|
436 |
|
437 |
if self.is_decoder:
|
|
|
431 |
context_layer = context_layer.view(new_context_layer_shape)
|
432 |
|
433 |
outputs = (
|
434 |
+
(context_layer, attention_scores) if output_attentions else (context_layer,)
|
435 |
)
|
436 |
|
437 |
if self.is_decoder:
|