Open Neural Network Exchange (ONNX)
provides an open source format for AI models. It defines an extensible
computation graph model, as well as definitions of built-in operators
and standard data types.

In this tutorial, we will show how you can save MXNet models to the ONNX
format.

MXNet-ONNX operators coverage and features are updated regularly. Visit
the ONNX operator
coverage
page for the latest information.

In this tutorial, we will learn how to use MXNet to ONNX exporter on
pre-trained models.

export_model API can accept the MXNet model in one of the following
two ways.

MXNet sym, params objects:

This is useful if we are training a model. At the end of training,
we just need to invoke the export_model function and provide
sym and params objects as inputs with other attributes to save the
model in ONNX format.

MXNet’s exported json and params files:

This is useful if we have pre-trained models and we want to
convert them to ONNX format.

Since we have downloaded pre-trained model files, we will use the
export_model API by passing the path for symbol and params files.