bytecodealliance / bytecodealliance/wasmtime
crates/wasi-nn/examples/classification-example diminsion mismatch
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 126
Description
currently the example outputs something like
```
Found results, sorted top 5: [InferenceResult(885, 0.3958259), InferenceResult(904, 0.36464667), InferenceResult(84, 0.010480272), InferenceResult(911, 0.0082290545), InferenceResult(741, 0.0072448305)]
spacetanuki%
```
but it's quite wrong because of dimension mismatch.
ie. while the model expects 3x244x244, the file is 244x244x3.
if i transpose tensor.bgr to 3x244x244, it produces:
```
Found results, sorted top 5: [InferenceResult(963, 0.7113058), InferenceResult(762, 0.070707425), InferenceResult(909, 0.036355816), InferenceResult(926, 0.01545616), InferenceResult(567, 0.015344027)]
```
it's more reasonable and similar to what i got when running the same model with https://github.com/openvinotoolkit/open_model_zoo/tree/master/demos/classification_demo/python. (see the below screenshot)
Contributor guide
Assessment
This issue has not been assessed yet.