robinzixuan commited on
Commit
c8c6fb6
1 Parent(s): 1bbc668

Upload modeling_vit.py

Browse files
Files changed (1) hide show
  1. 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
- head_mask,
 
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
  )