Closed redthing1 closed 1 year ago
From what I can tell, this is because this code: https://github.com/webonnx/wonnx/blob/master/wonnx-py/src/lib.rs#L41
Seems to be expecting a Vec<f32>
? But what about inputs that have a more complex shape that aren't just a flat vector? Like a 1,224,224,3
tensor?
I figured this out: you have to reshape the input to a flat array. Leaving this here for posterity.
Describe the bug After converting the OpenNSFW ONNX model, and fixing the input shape to be a constant
(1,224,224,3)
, try to execute in WONNX.This exact same model works fine in onnxruntime.
To Reproduce
Here is the model opennsfw_wonnx.zip
Steps to reproduce the behavior:
wonnx-py
Expected behavior A clear and concise description of what you expected to happen.
I expect it to output what it outputs from
onnxruntime
, namely a(1,2)
output.Desktop (please complete the following information):