decoder_input_ids in c# #23203
Unanswered
minsik2021
asked this question in
API Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I tried to make the whisper inference app with multilingual model.
I realized that I needed to put one parameter "decoder_input_ids" in the input tensor, but I have no idea how I can set this value to the parameter. any idea?
my code is here - "decoder_input_ids" is excluded in the code.
List<NamedOnnxValue> input = new List<NamedOnnxValue> { NamedOnnxValue.CreateFromTensor("audio_stream", config.audio), NamedOnnxValue.CreateFromTensor("min_length", new DenseTensor<int>(new int[] {config.min_length}, new int[] { 1 })), NamedOnnxValue.CreateFromTensor("max_length", new DenseTensor<int>(new int[] {config.max_length}, new int[] { 1 })), NamedOnnxValue.CreateFromTensor("num_beams", new DenseTensor<int>(new int[] {config.num_beams}, new int[] { 1 })), NamedOnnxValue.CreateFromTensor("num_return_sequences", new DenseTensor<int>(new int[] {config.num_return_sequences}, new int[] { 1 })), NamedOnnxValue.CreateFromTensor("length_penalty", new DenseTensor<float>(new float[] {config.length_penalty}, new int[] { 1 })), NamedOnnxValue.CreateFromTensor("repetition_penalty", new DenseTensor<float>(new float[] {config.repetition_penalty}, new int[] { 1 })), };
Beta Was this translation helpful? Give feedback.
All reactions