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
0f226f78
Unverified
Commit
0f226f78
authored
Mar 22, 2021
by
Patrick von Platen
Committed by
GitHub
Mar 22, 2021
Browse files
push (#10846)
parent
82b8d8c7
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/FINE_TUNE_XLSR_WAV2VEC2.md
...les/research_projects/wav2vec2/FINE_TUNE_XLSR_WAV2VEC2.md
+1
-1
No files found.
examples/research_projects/wav2vec2/FINE_TUNE_XLSR_WAV2VEC2.md
View file @
0f226f78
...
@@ -401,7 +401,7 @@ def evaluate(batch):
...
@@ -401,7 +401,7 @@ def evaluate(batch):
with
torch
.
no_grad
():
with
torch
.
no_grad
():
logits
=
model
(
inputs
.
input_values
.
to
(
"cuda"
),
attention_mask
=
inputs
.
attention_mask
.
to
(
"cuda"
)).
logits
logits
=
model
(
inputs
.
input_values
.
to
(
"cuda"
),
attention_mask
=
inputs
.
attention_mask
.
to
(
"cuda"
)).
logits
pred_ids
=
torch
.
argmax
(
logits
,
dim
=-
1
)
pred_ids
=
torch
.
argmax
(
logits
,
dim
=-
1
)
batch
[
"pred_strings"
]
=
processor
.
batch_decode
(
pred_ids
)
batch
[
"pred_strings"
]
=
processor
.
batch_decode
(
pred_ids
)
return
batch
return
batch
...
...
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