Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
c6e865ac
Unverified
Commit
c6e865ac
authored
Oct 16, 2020
by
vblagoje
Committed by
GitHub
Oct 16, 2020
Browse files
Remove masked_lm_labels from returned dictionary (#7818)
parent
96e47d92
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
2 deletions
+0
-2
src/transformers/data/data_collator.py
src/transformers/data/data_collator.py
+0
-2
No files found.
src/transformers/data/data_collator.py
View file @
c6e865ac
...
...
@@ -449,8 +449,6 @@ class DataCollatorForNextSentencePrediction:
"labels"
:
mlm_labels
if
self
.
mlm
else
None
,
"next_sentence_label"
:
torch
.
tensor
(
nsp_labels
),
}
if
self
.
mlm
:
result
[
"masked_lm_labels"
]
=
mlm_labels
return
result
def
_tensorize_batch
(
self
,
examples
:
List
[
torch
.
Tensor
])
->
torch
.
Tensor
:
...
...
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