Skip to content

Commit

Permalink
[Flax] Correct typo (huggingface#11374)
Browse files Browse the repository at this point in the history
* finish

* fix copy
  • Loading branch information
patrickvonplaten authored and Iwontbecreative committed Jul 15, 2021
1 parent 034b35c commit b636f40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/transformers/models/bert/modeling_flax_bert.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def __call__(self, hidden_states, attention_mask, deterministic=True):
attention_bias = None

dropout_rng = None
if not deterministic and self.dropout_rate > 0.0:
if not deterministic and self.config.attention_probs_dropout_prob > 0.0:
dropout_rng = self.make_rng("dropout")

attn_output = dot_product_attention(
Expand Down
2 changes: 1 addition & 1 deletion src/transformers/models/roberta/modeling_flax_roberta.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def __call__(self, hidden_states, attention_mask, deterministic=True):
attention_bias = None

dropout_rng = None
if not deterministic and self.dropout_rate > 0.0:
if not deterministic and self.config.attention_probs_dropout_prob > 0.0:
dropout_rng = self.make_rng("dropout")

attn_output = dot_product_attention(
Expand Down

0 comments on commit b636f40

Please sign in to comment.