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
3b84d86b
Unverified
Commit
3b84d86b
authored
Jun 26, 2023
by
Matthijs Hollemans
Committed by
GitHub
Jun 26, 2023
Browse files
add missing alignment_heads to Whisper integration test (#24487)
add missing alignment heads
parent
868363ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
tests/models/whisper/test_modeling_whisper.py
tests/models/whisper/test_modeling_whisper.py
+1
-0
No files found.
tests/models/whisper/test_modeling_whisper.py
View file @
3b84d86b
...
@@ -1442,6 +1442,7 @@ class WhisperModelIntegrationTests(unittest.TestCase):
...
@@ -1442,6 +1442,7 @@ class WhisperModelIntegrationTests(unittest.TestCase):
processor
=
WhisperProcessor
.
from_pretrained
(
"openai/whisper-tiny"
)
processor
=
WhisperProcessor
.
from_pretrained
(
"openai/whisper-tiny"
)
model
=
WhisperForConditionalGeneration
.
from_pretrained
(
"openai/whisper-tiny"
)
model
=
WhisperForConditionalGeneration
.
from_pretrained
(
"openai/whisper-tiny"
)
model
.
to
(
torch_device
)
model
.
to
(
torch_device
)
model
.
generation_config
.
alignment_heads
=
[[
2
,
2
],
[
3
,
0
],
[
3
,
2
],
[
3
,
3
],
[
3
,
4
],
[
3
,
5
]]
input_speech
=
self
.
_load_datasamples
(
4
)
input_speech
=
self
.
_load_datasamples
(
4
)
input_features
=
processor
.
feature_extractor
(
raw_speech
=
input_speech
,
return_tensors
=
"pt"
).
input_features
.
to
(
input_features
=
processor
.
feature_extractor
(
raw_speech
=
input_speech
,
return_tensors
=
"pt"
).
input_features
.
to
(
...
...
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