-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JAVA] If_0_then_branch__Inline_0__/decoder/rnn/LSTM' Status Message: Input X must have 3 dimensions only. Actual:{1,1,1,128,4} #550
Comments
A possible step-by-step solution:
From the error it may seem that an extra dimension was passed at some point somewhere. Also comparing the probabilities is useful. Also the current JAVA example was not updated for |
Thank you so much for your email with the step-by-step solution. It's extremely helpful and much appreciated!
I'll follow your advice.Thanks again for your guidance!
…------------------ 原始邮件 ------------------
发件人: "Alexander ***@***.***>;
发送时间: 2024年10月11日(星期五) 晚上8:24
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [snakers4/silero-vad] [JAVA] If_0_then_branch__Inline_0__/decoder/rnn/LSTM' Status Message: Input X must have 3 dimensions only. Actual:{1,1,1,128,4} (Issue #550)
A possible step-by-step solution:
Launch old JAVA example;
Print tensor dimensions on each step of the ONNX wrapper;
Launch v5 python ONNX example and print the same dimensions;
Amend the new JAVA example accordingly;
From the error it may seem that an extra dimension was passed at some point somewhere.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I tried it out, but strangely, despite my current code having the same input dimensions as the python/javawav example and maintaining consistent dimensions, the javawav runs normally, while the javaexample for reading microphone audio encounters errors. Could there be a problem with the original part that reads the microphone audio? |
All other factors being equal if python and java output similar probabilities for each chunk in ideal case, then it is data preprocessing most likely In this case look for the data format differences (sample rate, channels, dimensions, chunk size) |
I have resolved the bug in the model.call() method by modifying the multiplication symbol (*) to a division symbol (/) in the array initialization: byte[] data = new byte[WINDOW_SIZE_SAMPLES / 2];. |
❓ Questions and Help
Error code - ORT_INVALID_ARGUMENT - message: Non-zero status code returned while running If node. Name:'If_0' Status Message: Non-zero status code returned while running If node. Name:'If_0_then_branch__Inline_0__/decoder/If_1' Status Message: Non-zero status code returned while running LSTM node. Name:'If_0_then_branch__Inline_0__/decoder/rnn/LSTM' Status Message: Input X must have 3 dimensions only. Actual:{1,1,1,128,4}
The error occurred when using the code in example/java.I have already modified part of the code in the SlieroVadOnnxModel by referring to wavjava to make the input compatible with V5, but I still encountered this error. Has anyone else encountered this issue, and what should I do?
The text was updated successfully, but these errors were encountered: