Open 7r3nzy opened 1 year ago
Location where the comparison takes place:
It seems like Op
always returns 1.
@kali is it something that's doable? if so I'd be interested to make an attempt on it :).
Also I looked at the tract trace and it seems like it is able to analyze the whole model except the If
operator.
what if in onnx/src/ops/logic.rs
we do something like this for If
:
fn nboutputs(&self) -> TractResult<usize> {
if self.else_body.outputs.len() == self.then_body.outputs.len() {
Ok(self.then_body.outputs.len())
} else {
//Some Err()
}
}
It seems like I might have ditched that If
error temporarily then I ran into this one :)
Caused by:
0: Infering facts
1: Failed analyse for node #121 "Cast_173" onnx.Cast
2: Eager eval during inference
3: Evaluating #1 "adhoc" onnx.Cast
4: Unsupported cast from TDim to Bool
It is coming from then_branch
could be a separate issue related to Cast Op
:
Hello! thanks for your interest and sorry for delay in answering.
The nboutput fix feels right. Feel free to make it a PR. You can use the ensure!
macro to perform the test (search in the current codebase for inspiration).
I will have a look at the TDim to bool cast.
Awesome! Thanks :)
tract does not have an actual If operator at this stage (it expects the boolean condition to be resolved at load time, and substitutes itself with one branch accordingly). I'm putting this in the backlog for now.
Awesome! Thanks :)
@7r3nzy I noticed that this is a reopened issue. Can you confirm if you are able to load the Silero model successfully on your end?
I am trying to load silero-vad-v4 onnx but it is giving me the following error:
This is how I am loading it:
model overview
If_25
node is the one with 3 outputstract version:
0.19.8
Update:
Running through command line has the same behavior: