onnxmltools icon indicating copy to clipboard operation
onnxmltools copied to clipboard

Unsupported ONNX ops of type: Identity

Open leonzfa opened this issue 5 years ago • 5 comments

I used the example code to generate onnx model from keras, and then I convert onnx to mlmodel. It raised the error "Unsupported ONNX ops of type: Identity"

leonzfa avatar May 16 '19 18:05 leonzfa

Hi @leonzfa! Thanks for trying onnxmltools. Did you use onnx-coreml to convert your ONNX model to the CoreML format? Unfortunately it looks like Identity is not on the list of supported ops from the onnx-coreml converter, but can be implemented using a CoreML custom layer.

The developers are very active, so I recommend filing an issue in that repository!

vinitra-zz avatar May 16 '19 23:05 vinitra-zz

@vinitra Yes. I used the onnx-coreml for my conversion. But in fact there is no Identity layer in the example code (Keras to ONNX Conversion). Why this onnxmltools generates Identity layer? Maybe it is not neccesary.

leonzfa avatar May 19 '19 16:05 leonzfa

@leonzfa, which version of onnx and onnxmltools are you using?

vinitra-zz avatar May 22 '19 18:05 vinitra-zz

any news about this layer?I have the same problem.

Zrufy avatar Sep 24 '19 15:09 Zrufy

I wrote a PR to remove unnecessary Identity node in a graph. https://github.com/microsoft/onnxconverter-common/pull/21, we may modify the convert function to use it. It does not solve the inner issue but could unblock you.

xadupre avatar Sep 26 '19 15:09 xadupre