Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

TypeError: cannot resolve operator 'Shape' with opsets: ai.onnx v12 #308

Open
jimeffry opened this issue Aug 10, 2021 · 3 comments
Open

Comments

@jimeffry
Copy link

jimeffry commented Aug 10, 2021

When I run the onnx model in onnx.js environment, I get the problem as below.

 opset.ts:48 Uncaught (in promise) TypeError: cannot resolve operator 'Shape' with opsets: ai.onnx v12
    at Object.e.resolveOperator (opset.ts:48)
    at t.resolve (session-handler.ts:60)
    at e.initializeOps (session.ts:235)
    at session.ts:92
    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)
    at a (onnx.min.js:14)

And the javascript code is here.

<script src="https://cdn.jsdelivr.net/npm/onnxjs/dist/onnx.min.js"></script>
<script src="script.js"></script>

The codes of onnx model inference lies in script.js. The error part is below.

const sess = new onnx.InferenceSession();
const loadingModelPromise = sess.loadModel("facedetect_int32.onnx");

We look forward to your reply!Thanks

@helloahn
Copy link

How about using the alternatives like,
https://cdn.jsdelivr.net/npm/[email protected]/dist/onnx.min.js

@jimeffry
Copy link
Author

@helloahn Thank you very much for your reply ! Another new problem has arisen.(#310 )

@nicolalandro
Copy link

I also have erros like that

Uncaught (in promise) TypeError: cannot resolve operator 'Cast' with opsets: ai.onnx v12

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants