microsoft / onnxjs

ONNX.js: run ONNX models using JavaScript
Other
1.75k stars 130 forks source link

Uncaught (in promise) TypeError: cannot resolve operator 'MaxPool' with opsets: ai.onnx v11 #239

Open shiragit opened 3 years ago

shiragit commented 3 years ago

Hi,

I've exported a torch model to onnx with op_set=11. When tried to load with onnx.js I got the following error:

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

Screenshot from 2020-11-10 14-26-41

MaxPool is a supported operator according to the docs. Exporting to onnx with op_set=10 is not an option due to other unsupported ops.

Thanks!

htfy96 commented 3 years ago

I believe op_set=10 doesn't work either because https://github.com/microsoft/onnxjs/blob/a183fa62188adad63a2983322672617c42a0ce55/lib/backends/webgl/op-resolve-rules.ts#L70 says that only 1-9 are supported.

leonardts commented 3 years ago

@shiragit have you found a solution?

sontr-n commented 3 years ago

has anyone resolved this?