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
6fc3d34a
Commit
6fc3d34a
authored
Feb 06, 2020
by
Peter Izsak
Committed by
Lysandre Debut
Feb 06, 2020
Browse files
Fix multi-gpu evaluation in run_glue.py
parent
7748cbbe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/run_glue.py
examples/run_glue.py
+1
-1
No files found.
examples/run_glue.py
View file @
6fc3d34a
...
...
@@ -310,7 +310,7 @@ def evaluate(args, model, tokenizer, prefix=""):
eval_dataloader
=
DataLoader
(
eval_dataset
,
sampler
=
eval_sampler
,
batch_size
=
args
.
eval_batch_size
)
# multi-gpu eval
if
args
.
n_gpu
>
1
:
if
args
.
n_gpu
>
1
and
not
isinstance
(
model
,
torch
.
nn
.
DataParallel
)
:
model
=
torch
.
nn
.
DataParallel
(
model
)
# Eval!
...
...
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