window.session = new InferenceSession({ backendHint: 'webgl' }); // does that make it global?
const modelURL = "./models/seg_rn.onnx";
await window.session.loadModel(modelURL);
However, I get the following error when the model tries to load:
Uncaught (in promise) TypeError: cannot resolve operator 'Shape' with opsets: ai.onnx v11
Obviously this is related to the Shape operator.
What exactly is the issue?
I saw that Shape was updated recently (just after the last release), will that update fix this issue?
It looks like I'm using different opsets when I export the model and when I try to load it. How do I control the opset used by onnxjs?
I've exported a pretrained resnet101-FCN from pytorch using the following:
And tried to import it in onnxjs with this:
However, I get the following error when the model tries to load:
Uncaught (in promise) TypeError: cannot resolve operator 'Shape' with opsets: ai.onnx v11
Obviously this is related to the Shape operator.
Thanks