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
05b4c329
"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "b3595cf02b9997e9acfc23ed6f4bcec78cd315ed"
Unverified
Commit
05b4c329
authored
Mar 31, 2022
by
Bhadresh Savani
Committed by
GitHub
Mar 31, 2022
Browse files
fixed a typo (#16508)
parent
6a4dbba1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/pytorch/question-answering/run_qa_no_trainer.py
examples/pytorch/question-answering/run_qa_no_trainer.py
+1
-1
No files found.
examples/pytorch/question-answering/run_qa_no_trainer.py
View file @
05b4c329
...
@@ -791,7 +791,7 @@ def main():
...
@@ -791,7 +791,7 @@ def main():
if
not
args
.
pad_to_max_length
:
# necessary to pad predictions and labels for being gathered
if
not
args
.
pad_to_max_length
:
# necessary to pad predictions and labels for being gathered
start_logits
=
accelerator
.
pad_across_processes
(
start_logits
,
dim
=
1
,
pad_index
=-
100
)
start_logits
=
accelerator
.
pad_across_processes
(
start_logits
,
dim
=
1
,
pad_index
=-
100
)
end_logits
=
accelerator
.
pad_across_processes
(
start
_logits
,
dim
=
1
,
pad_index
=-
100
)
end_logits
=
accelerator
.
pad_across_processes
(
end
_logits
,
dim
=
1
,
pad_index
=-
100
)
all_start_logits
.
append
(
accelerator
.
gather
(
start_logits
).
cpu
().
numpy
())
all_start_logits
.
append
(
accelerator
.
gather
(
start_logits
).
cpu
().
numpy
())
all_end_logits
.
append
(
accelerator
.
gather
(
end_logits
).
cpu
().
numpy
())
all_end_logits
.
append
(
accelerator
.
gather
(
end_logits
).
cpu
().
numpy
())
...
...
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