keras-onnx
keras-onnx copied to clipboard
Convert tf.keras/Keras models to ONNX
Warning is done at import time since import will fail on some tf versions. 
We stopped active development of keras2onnx and keras2onnx is now frozen to tf-2.3 and onnx-1.10. To convert your Keras models you can head over to [tf2onnx](https://github.com/onnx/tensorflow-onnx) which can convert Tensorflow,...
Basically I tried following this [Transfer Learning tutorial](https://www.tensorflow.org/tutorials/images/transfer_learning) . I made minor adjustments like used the Stanford Dog Breed dataset and used softmax in the final layer instead of sigmoid....
#### My code snippet for conversion: ``` MODEL_NAME = "data/pie/intention/context_loc_pretrained/model" model = load_model(MODEL_NAME + ".h5") onnx_model = keras2onnx.convert_keras(model, model.name, target_opset=14) temp_model_file = MODEL_NAME + ".onnx" onnx.save_model(onnx_model, temp_model_file) ``` #### Error...
Converting a keras model to onnx, I faced the following error: AssertionError: Tensor Transformer-11-MultiHeadSelfAttention-Add/All:0 already processed ###main code ``` import keras2onnx onnx_model = keras2onnx.convert_keras(model, model.name, debug_mode=True) temp_model_file = 'model.onnx' keras2onnx.save_model(onnx_model,...
I tried to convert a keras model that contains 2D group convolutions and in the resulting ONNX file the group parameter is always 1 even though it should be different....
I try to convert a model using the additive attention layer from keras https://keras.io/api/layers/attention_layers/additive_attention/ I got the following error : WARN: No corresponding ONNX op matches the tf.op node additive_attention/cond...
Hi, I am trying to accelerate a NLP pipeline using keras-onnx. The Keras model consisting a CRF layer (tf2crf) on top of the BiLSTM layer. I faced a following error:...
Are text classifiaction huggingface models supported? I'm getting invalid graph when running this: ```python import os from transformers import TFBertForSequenceClassification import keras2onnx model_keras = TFBertForSequenceClassification.from_pretrained('bert-base-cased') model_onnx = keras2onnx.convert_keras(model_keras, model_keras.name) import...
**System information** - OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04 - ONNX Runtime installed from (source or binary): pip - ONNX Runtime version: 1.7.0 - Python version:...