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
7d40901c
Unverified
Commit
7d40901c
authored
Apr 21, 2020
by
Bharat Raghunathan
Committed by
GitHub
Apr 21, 2020
Browse files
Fix Documentation issue in BertForMaskedLM forward (#3855)
parent
b1ff0b2a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/modeling_bert.py
src/transformers/modeling_bert.py
+1
-1
No files found.
src/transformers/modeling_bert.py
View file @
7d40901c
...
...
@@ -957,7 +957,7 @@ class BertForMaskedLM(BertPreTrainedModel):
ltr_lm_loss
=
loss_fct
(
prediction_scores
.
view
(
-
1
,
self
.
config
.
vocab_size
),
lm_labels
.
view
(
-
1
))
outputs
=
(
ltr_lm_loss
,)
+
outputs
return
outputs
# (
masked
_lm_loss), (
ltr
_lm_loss), prediction_scores, (hidden_states), (attentions)
return
outputs
# (
ltr
_lm_loss), (
masked
_lm_loss), prediction_scores, (hidden_states), (attentions)
@
add_start_docstrings
(
...
...
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