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
395ffcd7
Unverified
Commit
395ffcd7
authored
Mar 05, 2021
by
Patrick von Platen
Committed by
GitHub
Mar 05, 2021
Browse files
fix run seq2seq (#10547)
parent
54e55b52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/research_projects/wav2vec2/run_asr.py
examples/research_projects/wav2vec2/run_asr.py
+1
-1
No files found.
examples/research_projects/wav2vec2/run_asr.py
View file @
395ffcd7
...
@@ -251,7 +251,7 @@ def main():
...
@@ -251,7 +251,7 @@ def main():
pred_logits
=
pred
.
predictions
pred_logits
=
pred
.
predictions
pred_ids
=
np
.
argmax
(
pred_logits
,
axis
=-
1
)
pred_ids
=
np
.
argmax
(
pred_logits
,
axis
=-
1
)
pred
.
label_ids
[
pred
.
label_ids
==
-
100
]
=
0
pred
.
label_ids
[
pred
.
label_ids
==
-
100
]
=
processor
.
tokenizer
.
pad_token_id
pred_str
=
processor
.
batch_decode
(
pred_ids
)
pred_str
=
processor
.
batch_decode
(
pred_ids
)
# we do not want to group tokens when computing the metrics
# we do not want to group tokens when computing the metrics
...
...
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