microsoft / onnxjs

ONNX.js: run ONNX models using JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: cannot resolve operator 'Shape' with opsets: ai.onnx v11

sambitraze opened this issue · comments

I trained a custom YOLO V4 tiny model in darknet format (got .cfg and .weights file respectively). I converted this model into onnx format using python demo_darknet2onnx.py yolov4-csp.cfg yolov4-csp.weights people.jpg 0 from repository https://github.com/Tianxiaomo/pytorch-YOLOv4

This onnx model was working fine on onnx runtime but on running it in js it is giving following error.

opset.ts:48 Uncaught (in promise) TypeError: cannot resolve operator 'Shape' with opsets: ai.onnx v11
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. (session.ts:63)
at onnx.min.js:14
at Object.next (onnx.min.js:14)
at a (onnx.min.js:14)

Thanks for the feedback. We have migrated ONNX.js to ONNX Runtime Web, which provides a full operator support in 'wasm' backend.

thanks