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
4270d3da
Commit
4270d3da
authored
Aug 19, 2019
by
erenup
Browse files
fix a bug of evaluating
parent
b8fde438
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/single_model_scripts/run_multiple_choice.py
examples/single_model_scripts/run_multiple_choice.py
+1
-1
No files found.
examples/single_model_scripts/run_multiple_choice.py
View file @
4270d3da
...
@@ -253,7 +253,7 @@ def evaluate(args, model, tokenizer, prefix=""):
...
@@ -253,7 +253,7 @@ def evaluate(args, model, tokenizer, prefix=""):
with
open
(
output_eval_file
,
"w"
)
as
writer
:
with
open
(
output_eval_file
,
"w"
)
as
writer
:
logger
.
info
(
"***** Eval results {} *****"
.
format
(
prefix
))
logger
.
info
(
"***** Eval results {} *****"
.
format
(
prefix
))
writer
.
write
(
"model =%s
\n
"
%
str
(
args
.
model_name_or_path
))
writer
.
write
(
"model =%s
\n
"
%
str
(
args
.
model_name_or_path
))
writer
.
write
(
"total batch size=%d
\n
"
%
(
args
.
train_batch_size
*
args
.
gradient_accumulation_steps
*
writer
.
write
(
"total batch size=%d
\n
"
%
(
args
.
per_gpu_
train_batch_size
*
args
.
gradient_accumulation_steps
*
(
torch
.
distributed
.
get_world_size
()
if
args
.
local_rank
!=
-
1
else
1
)))
(
torch
.
distributed
.
get_world_size
()
if
args
.
local_rank
!=
-
1
else
1
)))
writer
.
write
(
"train num epochs=%d
\n
"
%
args
.
num_train_epochs
)
writer
.
write
(
"train num epochs=%d
\n
"
%
args
.
num_train_epochs
)
writer
.
write
(
"fp16 =%s
\n
"
%
args
.
fp16
)
writer
.
write
(
"fp16 =%s
\n
"
%
args
.
fp16
)
...
...
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