onnx / onnxmltools

ONNXMLTools enables conversion of models to ONNX
https://onnx.ai
Apache License 2.0
1k stars 181 forks source link

Unsupported ONNX ops of type: Identity #298

Open leonzfa opened 5 years ago

leonzfa commented 5 years ago

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"

vinitra-zz commented 5 years ago

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!

leonzfa commented 5 years ago

@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.

vinitra-zz commented 5 years ago

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

Zrufy commented 5 years ago

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

xadupre commented 5 years ago

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.