Fix whisper export (#20800)

* fix_whisper_export

* update input

* update input
This commit is contained in:
Mohit Sharma 2022-12-21 20:58:42 +05:30 committed by GitHub
parent 3090e70857
commit aaa6296de2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -264,6 +264,9 @@ class WhisperOnnxConfig(OnnxSeq2SeqConfigWithPast):
time_duration=time_duration,
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(
preprocessor.tokenizer, batch_size, seq_length, is_pair, framework
)