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

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

Description

@jimeffry

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions