Upload modeling_vit.py
Browse files- modeling_vit.py +2 -2
modeling_vit.py
CHANGED
@@ -325,9 +325,9 @@ class ViTSdpaSelfAttention(ViTSelfAttention):
|
|
325 |
query_layer,
|
326 |
key_layer,
|
327 |
value_layer,
|
328 |
-
|
|
|
329 |
softmax_fn = self.softmax_fn,
|
330 |
-
self.attention_probs_dropout_prob if self.training else 0.0,
|
331 |
is_causal=False,
|
332 |
scale=None,
|
333 |
)
|
|
|
325 |
query_layer,
|
326 |
key_layer,
|
327 |
value_layer,
|
328 |
+
dropout_p=self.attention_probs_dropout_prob if self.training else 0.0,
|
329 |
+
attn_mask=head_mask,
|
330 |
softmax_fn = self.softmax_fn,
|
|
|
331 |
is_causal=False,
|
332 |
scale=None,
|
333 |
)
|