Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
380280d9
Unverified
Commit
380280d9
authored
May 15, 2023
by
Yih-Dar
Committed by
GitHub
May 15, 2023
Browse files
Fix `BigBirdForMaskedLM` doctest (#23369)
fix Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
96ae83a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/big_bird/modeling_big_bird.py
src/transformers/models/big_bird/modeling_big_bird.py
+1
-1
No files found.
src/transformers/models/big_bird/modeling_big_bird.py
View file @
380280d9
...
...
@@ -2453,7 +2453,7 @@ class BigBirdForMaskedLM(BigBirdPreTrainedModel):
>>> labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -100)
>>> outputs = model(**inputs, labels=labels)
>>> round(outputs.loss.item(), 2)
1.
08
1.
99
```
"""
return_dict
=
return_dict
if
return_dict
is
not
None
else
self
.
config
.
use_return_dict
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment