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
38f740a1
"vscode:/vscode.git/clone" did not exist on "3fe5c8e8a8fc3733c2be67dffb8a5b3935f94250"
Commit
38f740a1
authored
Nov 02, 2018
by
VictorSanh
Browse files
Fix bug writing predictions in run_squad_pytorch
parent
ee29871f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
run_squad_pytorch.py
run_squad_pytorch.py
+2
-2
No files found.
run_squad_pytorch.py
View file @
38f740a1
...
@@ -910,8 +910,8 @@ def main():
...
@@ -910,8 +910,8 @@ def main():
#end_logits = [x.item() for x in end_logits]
#end_logits = [x.item() for x in end_logits]
end_logits
=
[
x
.
view
(
-
1
).
detach
().
cpu
().
numpy
()
for
x
in
end_logits
]
end_logits
=
[
x
.
view
(
-
1
).
detach
().
cpu
().
numpy
()
for
x
in
end_logits
]
for
idx
,
i
in
enumerate
(
unique_id
):
for
idx
,
i
in
enumerate
(
unique_id
):
s
=
start_logits
[
idx
]
s
=
[
float
(
x
)
for
x
in
start_logits
[
idx
]
]
e
=
end_logits
[
idx
]
e
=
[
float
(
x
)
for
x
in
end_logits
[
idx
]
]
all_results
.
append
(
all_results
.
append
(
RawResult
(
RawResult
(
unique_id
=
i
,
unique_id
=
i
,
...
...
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