-
Notifications
You must be signed in to change notification settings - Fork 128
onnx model error: int64 is not supported #168
Comments
Did you find a solution? |
sorry,no |
Same issue, where might it be going wrong. |
Javascript has no |
Does it mean quantization? |
Where is your model using the int64? |
I had similar issues with my graphs. The way I went for was using the winmltools for loading the graph into memory. Afterwards i edit the graph in python. I know there is near to no documentation on this. I used a debugger to analyse the object. You can try it like this, I guess... |
Would you mind talking about some of the details? Like what's the function to check the nodes and change its data type. The introduction on the WinMLtools official website didn't talk about it.
I'm feeling like I lost the direction...... |
For example my pytorch export was exporting the graph with -1 as dimenstion of expand. I've wrote a function to replace the -1 with the fixed graph dimensions:
|
here is a script to compress the nodes names, saves a few kb on large models. Still working on quantisation, but had not the time to do so right now.
|
We really need a (better) library for this in the onnx ecosystem. Working with and fixing graphs is tedious this way. |
@28Smiles I do find a way to remove the old node/initializer and insert the new one. However, the new problem is onnx Operator ConstantOfShape doesn't support INT32 as its input. So when I'm using onnxruntime to test the model, it tells me that Maybe there is another Operator which has a similar function but support INT32 as input, however, I don't know what it is. |
Is this an onnx.js error? Why do you need a variable shape? |
It's an error in Python actually. I just modified the node based on the original model and test it in Python onnxruntime before using it in onnx.js. Could it be handled in onnx.js?;
In the document of onnx.js, it is said Shape has been supported for Cpu Backend. |
yes, but its unreleased, you have to build the master |
Just to confirm, will ConstantOfShape be supported in the new version? Thank you! |
Only the Shape operator |
Just wasted 6 hours with this problem. Can someone please fix this? |
I am sorry to tell you that the ConstantOfShapes node requires int64. I set all of the values to be int32 manually before, and it becomes invalid. |
@waittim which approach you choose ? |
This works if you use the "wasm" backend and bring onnx into the browser using <script> tags. I did not have any luck with esbuild bundler. And the docs clearly state (once I read them), that the 'webgl' backend supports only a subset of operators. |
i use a model from https://github.com/onnx/models/tree/master/vision/object_detection_segmentation/mask-rcnn mask-rcnn
and load the model in onnxjs
just follow the instructions.
const model = new onnx.InferenceSession();
await model.loadModel("./mask_rcnn_R_50_FPN_1x.onnx");
but errors occur, int64 is not supported.
why is that? how to solve it?
The text was updated successfully, but these errors were encountered: