Introduction:
This page tracks the current status and development to support ONNX on Mxnet. We currently support:
- import of ONNX models into Mxnet.
- export MXNet models to ONNX format.
ONNX-MXNET Import Module
We have two repositories for the import module:
- onnx-mxnet repository inside onnx https://github.com/onnx/onnx-mxnet (deprecated)
- A newly created and refactored module inside Mxnet -> contrib. https://github.com/apache/incubator-mxnet/tree/master/python/mxnet/contrib/onnx/onnx2mx
MXNET-ONNX Export module
A new module has been added to MXNet repository to export MXNet models to ONNX model format. https://github.com/apache/incubator-mxnet/tree/master/python/mxnet/contrib/onnx/mx2onnx
Operator Coverage:
This table keeps track of the status of all ONNX operators supported by Mxnet.
ONNX backend test script reports the coverage on the operators and attributes.
Operator | Test Coverage | Mxnet (Import) | Mxnet (Export) |
---|---|---|---|
Abs | Yes | OK | OK |
Acos | OK, In review | ||
Add | Yes | OK | OK |
And | Yes | OK | |
ArgMax | Yes | OK | OK |
ArgMin | Yes | OK | OK |
Asin | OK, In review | ||
Atan | OK, In review | ||
AveragePool | Yes | OK | OK |
BatchNormalization | Yes | OK | OK |
Cast | Yes | OK | OK |
Ceil | Yes | OK | OK |
Clip | Yes | OK | |
Concat | Yes | OK | OK |
Constant | Yes | OK | |
Conv | Yes | OK | OK |
ConvTranspose | Yes | OK | OK |
Cos | OK, In review | ||
DepthToSpace | NOT OK, under development | ||
Div | Yes | OK | OK |
Dropout | Yes | OK | OK |
Elu | Yes | OK | OK |
Equal | Yes | OK | |
Exp | Yes | OK | OK |
Flatten | Yes | PARTIAL, only supports default axis=1 | OK |
Floor | Yes | OK | OK |
GRU | NOT OK , under development | ||
Gather | Yes | OK | |
Gemm | Yes | OK | OK |
GlobalAveragePool | Yes | OK | OK |
GlobalLpPool | Yes | OK, In review | |
GlobalMaxPool | Yes | OK | OK |
Greater | Yes | OK | |
HardSigmoid | Yes | OK | |
Hardmax | Yes | OK, In review | |
Identity | NOT OK | ||
InstanceNormalization | Yes | OK, In review | |
LRN | Yes | OK | OK |
LSTM | NOT OK, under development | ||
LeakyRelu | Yes | OK | OK |
Less | Yes | OK | |
Log | Yes | OK | OK |
LogSoftMax | Yes | OK | |
LpNormalization | OK, In review | OK | |
LpPool | Yes | OK, In review | |
MatMul | OK, In review | ||
Max | Yes | OK | OK |
MaxPool | Yes | OK | OK |
MaxRoiPool | Yes | OK, In review | |
Mean | Yes | OK | OK |
Min | Yes | OK | OK |
Mul | Yes | OK | OK |
Multinomial | OK, In review | ||
Neg | Yes | OK | OK |
Not | Yes | OK | |
Or | Yes | OK | |
PRelu | Yes | OK | OK |
Pad | Yes | OK | OK |
Pow | Yes | Partial, only supports default axis=1 | OK |
RNN | NOT OK, under development | ||
RandomNormal | Yes | OK | |
RandomNormalLike | Yes | OK | |
RandomUniform | Yes | OK | |
RandomUniformLike | Yes | OK | |
Reciprocal | Yes | OK | OK |
ReduceL1 | Yes | OK | |
ReduceL2 | Yes | OK | |
ReduceLogSum | Yes | OK | |
ReduceLogSumExp | Yes | OK | |
ReduceMax | Yes | OK | OK |
ReduceMean | Yes | OK | OK |
ReduceMin | Yes | OK | OK |
ReduceProd | Yes | OK | OK |
ReduceSum | Yes | OK | |
ReduceSumSquare | Yes | OK | |
Relu | Yes | OK | OK |
Reshape | Yes | OK | OK |
Selu | Yes | NOT OK, under development | OK |
Shape | OK, In review | ||
Sigmoid | Yes | OK | OK |
Sin | OK, In review | ||
Size | OK, In review | ||
Slice | Yes | Partial, supports axis=1 | OK |
Softmax | Yes | OK | OK |
Softplus | Yes | OK | OK |
Softsign | Yes | OK | OK |
SpaceToDepth | NOT OK, under development | ||
Split | Yes | OK | OK |
Sqrt | Yes | OK | OK |
Squeeze | Yes | OK | OK |
Sub | Yes | OK | OK |
Sum | Yes | OK | OK |
Tan | OK, In review | ||
Tanh | Yes | OK | OK |
Tile | Yes | OK | |
TopK | OK, In review | ||
Transpose | Yes | OK | OK |
Unsqueeze | Yes | OK, In review | OK |
Upsample | OK, In review | ||
Xor | Yes | OK | |
experimental ATen | NOT OK | ||
experimental Affine | NOT OK | ||
experimental ConstantFill | NOT OK | ||
experimental Crop | NOT OK | ||
experimental GRUUnit | NOT OK | ||
experimental GivenTensorFill | NOT OK | ||
experimental If | NOT OK | ||
experimental ImageScaler | Yes | OK, In review | |
experimental Loop | NOT OK | ||
experimental LoopIndex | NOT OK | ||
experimental MeanVarianceNormalization | NOT OK | ||
experimental ParametricSoftplus | NOT OK | ||
experimental Scale | NOT OK | ||
experimental ScaledTanh | NOT OK | ||
experimental ThresholdedRelu | NOT OK |
ONNX models coverage:
ONNX backend tests include below models. The table lists current status on Mxnet:
ONNX Models | Mxnet Support |
---|---|
bvlc_alexnet | OK |
densenet121 | OK |
inception_v1 | OK, In review |
inception_v2 | OK, In review |
resnet50 | OK |
shufflenet | OK, In review |
squeezenet | OK |
vgg16 | OK |
vgg19 | OK |
bvlc_googlenet | OK |
bvlc_caffenet | OK |
bvlc-rcnn-ilsvrc13 | OK |