microsoft / onnxjs

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

Bad error message #251

Open kleinicke opened 3 years ago

kleinicke commented 3 years ago

The onnx model doesn't seem to load properly, but the error message doesn't help.

import { InferenceSession } from "onnxjs";
async function test() {
    const sess = new InferenceSession();
    await sess.loadModel("whatever");
test()

And the error message is

invalid wire type 4 at offset 16

Since it doesn't matter which path I put into the loadModel, it seems like this is the error message for not being able to load the model? Could this be replaced by something more expressive?

Similar problems was in #58 .