onnx-coreml icon indicating copy to clipboard operation
onnx-coreml copied to clipboard

Unsupported ONNX ops of type: Range

Open jbmaxwell opened this issue 4 years ago • 5 comments

I've been having trouble converting the Huggingface PyTorch DistilBert to CoreML. Initially the model converted but produced incorrect results when measured against PyTorch. Attempting to verify the ONNX model using onnxruntime I was blocked by an invalid type error relating to passing float to Equal. It was discovered that my model (despite using all the latest libs) was reporting Opset v9. Specifying opset_version=11 in my onnx.export() call did result in successful validation of the ONNX model against PyTorch. However, the addition also resulted in the above error. I have confirmed that changing the opset from v9 to v11 does add the Range node. I'm wondering if anyone could help resolving the problem? Perhaps a custom conversion function?

jbmaxwell avatar Mar 04 '20 17:03 jbmaxwell

This definitely seems to be a change for Opset 11. Searching around the repo I don't see any references to an opset version > 10, so I'm assuming this is unsupported. Is there a workaround?

jbmaxwell avatar Mar 05 '20 14:03 jbmaxwell

I'm experiencing the same with another model. Had to migrate to opset 11 for Upsample and now it doesn't work because Range op is not found.

s1ddok avatar Apr 09 '20 13:04 s1ddok

Yes, any news on opset v11 support for onnx-coreml?

jbmaxwell avatar Apr 09 '20 14:04 jbmaxwell

Ping, also experiencing this!

vade avatar Jan 03 '21 22:01 vade

opset10, how walk around it ?

whcjb avatar Mar 15 '21 12:03 whcjb