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
8960988f
Commit
8960988f
authored
Sep 19, 2019
by
erenup
Browse files
fixed to find best dev acc
parent
b57bfb5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/run_multiple_choice.py
examples/run_multiple_choice.py
+1
-1
No files found.
examples/run_multiple_choice.py
View file @
8960988f
...
...
@@ -170,7 +170,7 @@ def train(args, train_dataset, model, tokenizer):
results
=
evaluate
(
args
,
model
,
tokenizer
)
for
key
,
value
in
results
.
items
():
tb_writer
.
add_scalar
(
'eval_{}'
.
format
(
key
),
value
,
global_step
)
if
results
[
"eval_acc"
]
<
best_dev_acc
:
if
results
[
"eval_acc"
]
>
best_dev_acc
:
best_dev_acc
=
results
[
"eval_acc"
]
best_dev_loss
=
results
[
"eval_loss"
]
best_steps
=
global_step
...
...
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