Open bedapisl opened 4 years ago
If there are too many tf.ops in the error message, probably there are some layers were not able to be converted. can you share more details about this model?
Hello, the model is SSD network from https://github.com/pierluigiferrari, the problematic layer is this one: https://github.com/pierluigiferrari/ssd_keras/blob/master/keras_layers/keras_layer_DecodeDetections.py#L27
Hello, here is a simple example which demonstrates the problem:
import keras
import sys
sys.path.insert(0, "./ssd_keras") #path to https://github.com/pierluigiferrari/ssd_keras
from keras_layers.keras_layer_DecodeDetections import DecodeDetections
import onnxmltools
output_onnx_model = 'model.onnx'
keras_model = keras.Sequential()
keras_model.add(DecodeDetections(img_height=512, img_width=512))
keras_model.build(input_shape=(None, 24564, 98))
onnx_model = onnxmltools.convert_keras(keras_model, target_opset=12)
onnxmltools.utils.save_model(onnx_model, output_onnx_model)
To run it you will have to clone https://github.com/pierluigiferrari/ssd_keras
Hello, I am trying to convert my Keras model to ONNX format, but I am getting lots of warnings and an error:
Does this mean I have to reimplement all the ops mentioned in the warnings in ONNX? And how do I fix the error? Thanks for help
(I also posted this to onnxmltools (https://github.com/onnx/onnxmltools/issues/411).