mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-01 18:51:14 +06:00
Fix whisper export (#20800)
* fix_whisper_export * update input * update input
This commit is contained in:
parent
3090e70857
commit
aaa6296de2
@ -264,6 +264,9 @@ class WhisperOnnxConfig(OnnxSeq2SeqConfigWithPast):
|
|||||||
time_duration=time_duration,
|
time_duration=time_duration,
|
||||||
frequency=frequency,
|
frequency=frequency,
|
||||||
)
|
)
|
||||||
|
encoder_sequence_length = encoder_inputs["input_features"].shape[2]
|
||||||
|
seq_length = encoder_sequence_length // 2 if self.use_past else seq_length
|
||||||
|
|
||||||
decoder_inputs = super().generate_dummy_inputs(
|
decoder_inputs = super().generate_dummy_inputs(
|
||||||
preprocessor.tokenizer, batch_size, seq_length, is_pair, framework
|
preprocessor.tokenizer, batch_size, seq_length, is_pair, framework
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user