microsoft / onnxjs

ONNX.js: run ONNX models using JavaScript
Other
1.75k stars 130 forks source link

Error: unrecognized input '' for node: Resize_61 #310

Open jimeffry opened 3 years ago

jimeffry commented 3 years ago

In order to do inference in browser/JavaScript, I used torch.onnx.export() to get the onnx model. And the details are below.

torch.onnx.export(net,
                    dummy_input,
                    export_onnx_file,
                    opset_version=13,
                    input_names=["input"]
    )

However, I could not load the onnx model in onnx.js environment. The error is below.

Uncaught (in promise) Error: unrecognized input '' for node: Resize_61
    at t.buildGraph (graph.ts:313)
    at new t (graph.ts:139)
    at Object.from (graph.ts:77)
    at t.load (model.ts:25)
    at session.ts:85
    at t.event (instrument.ts:294)
    at e.initialize (session.ts:81)
    at e.<anonymous> (session.ts:63)
    at onnx.min.js:14
    at Object.next (onnx.min.js:14)

We look forward to your reply . Thank you!

fs-eire commented 2 years ago

Thanks for the feedback.

Currently we are working on migrating ONNX.js to ONNX Runtime Web which offers enhanced user experience and improved performance. Please visit ONNX Runtime Web to get more details.

ONNX Runtime Web has a full operator support in 'wasm' backend.