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
c4336ecb
"git@developer.sourcefind.cn:gaoqiong/composable_kernel.git" did not exist on "e9707881e3962b45fbe771bca1def0ebbce15353"
Commit
c4336ecb
authored
Oct 29, 2019
by
VictorSanh
Committed by
Lysandre Debut
Nov 27, 2019
Browse files
xnli - output_mode consistency
parent
d52e98ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/run_xnli.py
examples/run_xnli.py
+2
-2
No files found.
examples/run_xnli.py
View file @
c4336ecb
...
@@ -247,8 +247,8 @@ def evaluate(args, model, tokenizer, prefix=""):
...
@@ -247,8 +247,8 @@ def evaluate(args, model, tokenizer, prefix=""):
eval_loss
=
eval_loss
/
nb_eval_steps
eval_loss
=
eval_loss
/
nb_eval_steps
if
args
.
output_mode
==
"classification"
:
if
args
.
output_mode
==
"classification"
:
preds
=
np
.
argmax
(
preds
,
axis
=
1
)
preds
=
np
.
argmax
(
preds
,
axis
=
1
)
el
if
args
.
output_mode
==
"regression"
:
el
se
:
preds
=
np
.
squeeze
(
preds
)
raise
ValueError
(
f
'No other `output_mode` for XNLI.'
)
result
=
compute_metrics
(
eval_task
,
preds
,
out_label_ids
)
result
=
compute_metrics
(
eval_task
,
preds
,
out_label_ids
)
results
.
update
(
result
)
results
.
update
(
result
)
...
...
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