You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
I recently did transfer-learning on efficientdet and I wanted to convert it into javascript using onnx.js. It worked wonderfully in python, but it failed to work in javascript.
I got the error, attribute.ts:122 Uncaught (in promise) Error: graph attribute is not supported yet, and I'm really not sure what that means and how to fix it.
This was my process:
HERE is the notebook I used to train the model and export both the saved model and tensorflowjs.
I then used the saved model and converted it into onnx format by using THIS tutorial. My model worked in python.
After this I ran my model in javascript. My load_model function was:
async function runExample() {
// Create an ONNX inference session with WebGL backend.
const session = new onnx.InferenceSession({ backendHint: "webgl" });
// Load an ONNX model. This model is Resnet50 that takes a 1*3*224*224 image and classifies it.
await session.loadModel("./model.onnx");
}
When i used their default efficientDet(which used d2), I got TypeError: cannot resolve operator 'Cast' with opsets: ai.onnx v12,
and when I used my transfer-learned efficientDet(which used d0), I got Uncaught (in promise) Error: graph attribute is not supported yet
Why is this happening?
Thanks
The text was updated successfully, but these errors were encountered:
This looks like some operators are not supported by ONNX.js WebGL backend. The first error indicates that 'Cast' operator is not implemented, and the second error indicates that one of the "subgraph" operators ( If, Loop, Scan ) is used, which is not supported yet.
we are working on migrating ONNX.js to ONNX Runtime Web which offers enhanced user experience and improved performance. Please visit ONNX Runtime Web to get more details. Please try 'wasm' backend for capabilities of all operators.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello There,
I recently did transfer-learning on efficientdet and I wanted to convert it into javascript using onnx.js. It worked wonderfully in python, but it failed to work in javascript.
I got the error,
attribute.ts:122 Uncaught (in promise) Error: graph attribute is not supported yet
, and I'm really not sure what that means and how to fix it.This was my process:
HERE is the notebook I used to train the model and export both the saved model and tensorflowjs.
I then used the saved model and converted it into onnx format by using THIS tutorial. My model worked in python.
After this I ran my model in javascript. My load_model function was:
When i used their default efficientDet(which used d2), I got
TypeError: cannot resolve operator 'Cast' with opsets: ai.onnx v12
,and when I used my transfer-learned efficientDet(which used d0), I got
Uncaught (in promise) Error: graph attribute is not supported yet
Why is this happening?
Thanks
The text was updated successfully, but these errors were encountered: