remove Keras-ONNX references (#8820)

This commit is contained in:
Faith Xu 2021-08-26 17:05:33 -07:00 committed by GitHub
parent 6383a76d82
commit 5a9619beb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 14 deletions

View file

@ -247,4 +247,4 @@ Depending on which execution provider you're using, it may not have full support
NCHW and NHWC are two different memory layout for 4-D tensors.
Most TensorFlow operations used by a CNN support both NHWC and NCHW data format. The Tensorflow team suggests that on GPU NCHW is faster but on CPU NHWC is sometimes faster in Tensorflow. However, ONNX only supports NCHW. As a result, if the original model is in NHWC format, when the model is converted extra transposes may be added. The [tensorflow-onnx](https://github.com/onnx/tensorflow-onnx) and [keras-onnx](https://github.com/onnx/keras-onnx) converters do remove many of these transposes, but if this doesn't help sufficiently, consider retraining the model using NCHW.
Most TensorFlow operations used by a CNN support both NHWC and NCHW data format. The Tensorflow team suggests that on GPU NCHW is faster but on CPU NHWC is sometimes faster in Tensorflow. However, ONNX only supports NCHW. As a result, if the original model is in NHWC format, when the model is converted extra transposes may be added. The [tensorflow-onnx](https://github.com/onnx/tensorflow-onnx) converter does remove many of these transposes, but if this doesn't help sufficiently, consider retraining the model using NCHW.

View file

@ -90,7 +90,6 @@ Unless otherwise noted, please use the latest released version of the tools to c
|[ONNXMLTools](https://pypi.org/project/onnxmltools/)<br>CoreML, LightGBM, XGBoost, LibSVM|[Latest stable](https://github.com/onnx/onnxmltools/releases)|
|[ONNXMLTools](https://pypi.org/project/onnxmltools/)<br> SparkML|[Latest stable](https://github.com/onnx/onnxmltools/releases)|
|[SKLearn-ONNX](https://pypi.org/project/skl2onnx/)|[Latest stable](https://github.com/onnx/sklearn-onnx/releases)|
|[Keras-ONNX](https://pypi.org/project/keras2onnx/)|[Latest stable](https://github.com/onnx/keras-onnx/releases)|
|[Tensorflow-ONNX](https://pypi.org/project/tf2onnx/)|[Latest stable](https://github.com/onnx/tensorflow-onnx/releases)|
|[WinMLTools](https://docs.microsoft.com/en-us/windows/ai/windows-ml/convert-model-winmltools)|[Latest stable](https://pypi.org/project/winmltools/)|
|[AutoML](https://docs.microsoft.com/en-us/azure/machine-learning/service/concept-automated-ml)|[1.0.39+](https://pypi.org/project/azureml-automl-core) (ONNX v1.5) <br/>[1.0.33](https://pypi.org/project/azureml-automl-core/1.0.33/) (ONNX v1.4) |

View file

@ -20,7 +20,7 @@ ONNX Runtime can accelerate inferencing times for TensorFlow, TFLite, and Keras
## Export model to ONNX
### TensorFlow
### TensorFlow/Keras
These examples use the [TensorFlow-ONNX converter](https://github.com/onnx/tensorflow-onnx), which supports TensorFlow 1, 2, Keras, and TFLite model formats.
@ -29,21 +29,11 @@ These examples use the [TensorFlow-ONNX converter](https://github.com/onnx/tenso
* [TensorFlow: Image classification (efficientnet-edge)](https://github.com/onnx/tensorflow-onnx/blob/master/tutorials/efficientnet-edge.ipynb)
* [TensorFlow: Image classification (efficientnet-lite)](https://github.com/onnx/tensorflow-onnx/blob/master/tutorials/efficientnet-lite.ipynb)
* [TensorFlow: Natural Language Processing (BERT)](https://github.com/onnx/tensorflow-onnx/blob/master/tutorials/BertTutorial.ipynb)
* [Keras: Image classification (Resnet 50)](https://github.com/onnx/tensorflow-onnx/blob/master/tutorials/keras-resnet50.ipynb)
### TFLite
* [TFLite: Image classifciation (mobiledet)](https://github.com/onnx/tensorflow-onnx/blob/master/tutorials/mobiledet-tflite.ipynb)
### Keras
Keras models can be converted using either the [tensorflow-onnx](https://github.com/onnx/tensorflow-onnx) or [Keras-ONNX converter](https://github.com/onnx/keras-onnx). The TensorFlow-ONNX converter supports newer opsets with more active support.
* [tf2onnx: Image classification (Resnet 50)](https://github.com/onnx/tensorflow-onnx/blob/master/tutorials/keras-resnet50.ipynb)
* [keras2onnx: Image classification (efficientnet)](https://github.com/onnx/keras-onnx/blob/master/tutorial/TensorFlow_Keras_EfficientNet.ipynb)
* [keras2onnx: Image classification (Densenet)](https://www.onnxruntime.ai/python/auto_examples/plot_dl_keras.html#sphx-glr-auto-examples-plot-dl-keras-py)
* [keras2onnx: Natural Language Processing (BERT)](https://github.com/microsoft/onnxruntime/tree/master/onnxruntime/python/tools/transformers/notebooks/Tensorflow_Keras_Bert-Squad_OnnxRuntime_CPU.ipynb)
* [keras2onnx: Handwritten Digit Recognition (MNIST)](https://github.com/onnx/keras-onnx/blob/master/tutorial/TensorFlow_Keras_MNIST.ipynb)
## Accelerate TensorFlow model inferencing
* [Accelerate BERT model on CPU](https://github.com/microsoft/onnxruntime/blob/master/onnxruntime/python/tools/transformers/notebooks/PyTorch_Bert-Squad_OnnxRuntime_CPU.ipynb)
* [Accelerate BERT model on GPU](https://github.com/microsoft/onnxruntime/blob/master/onnxruntime/python/tools/transformers/notebooks/PyTorch_Bert-Squad_OnnxRuntime_GPU.ipynb)