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
101eabff
Commit
101eabff
authored
Nov 02, 2018
by
VictorSanh
Browse files
Debug run_squad_pytorch
parent
bb0a5103
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
run_squad_pytorch.py
run_squad_pytorch.py
+4
-2
No files found.
run_squad_pytorch.py
View file @
101eabff
...
@@ -905,8 +905,10 @@ def main():
...
@@ -905,8 +905,10 @@ def main():
start_logits
,
end_logits
=
model
(
input_ids
,
segment_ids
,
input_mask
)
start_logits
,
end_logits
=
model
(
input_ids
,
segment_ids
,
input_mask
)
unique_id
=
[
int
(
eval_features
[
e
.
item
()].
unique_id
)
for
e
in
example_index
]
unique_id
=
[
int
(
eval_features
[
e
.
item
()].
unique_id
)
for
e
in
example_index
]
start_logits
=
[
x
.
item
()
for
x
in
start_logits
]
#start_logits = [x.item() for x in start_logits]
end_logits
=
[
x
.
item
()
for
x
in
end_logits
]
start_logits
=
[
x
.
view
(
-
1
).
detach
().
cpu
().
numpy
()
for
x
in
start_logits
]
#end_logits = [x.item() for x in end_logits]
end_logits
=
[
x
.
view
(
-
1
).
detach
().
cpu
().
numpy
()
for
x
in
end_logits
]
all_results
.
append
(
all_results
.
append
(
RawResult
(
RawResult
(
unique_id
=
unique_id
,
unique_id
=
unique_id
,
...
...
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