Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
92e0ad5a
Commit
92e0ad5a
authored
Jun 18, 2019
by
thomwolf
Browse files
no numpy
parent
4e6edc32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
examples/run_classifier.py
examples/run_classifier.py
+2
-2
No files found.
examples/run_classifier.py
View file @
92e0ad5a
...
...
@@ -456,7 +456,7 @@ def main():
preds
=
np
.
argmax
(
preds
,
axis
=
1
)
elif
output_mode
==
"regression"
:
preds
=
np
.
squeeze
(
preds
)
result
=
compute_metrics
(
task_name
,
preds
,
out_label_ids
.
numpy
()
)
result
=
compute_metrics
(
task_name
,
preds
,
out_label_ids
)
if
args
.
local_rank
!=
-
1
:
# Average over distributed nodes if needed
...
...
@@ -533,7 +533,7 @@ def main():
eval_loss
=
eval_loss
/
nb_eval_steps
preds
=
preds
[
0
]
preds
=
np
.
argmax
(
preds
,
axis
=
1
)
result
=
compute_metrics
(
task_name
,
preds
,
out_label_ids
.
numpy
()
)
result
=
compute_metrics
(
task_name
,
preds
,
out_label_ids
)
if
args
.
local_rank
!=
-
1
:
# Average over distributed nodes if needed
...
...
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