...
- 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.
Status meaning:
OK = currently we support the operator
OK, in review = PR is out
NOT OK, under development = Operator is missing on MXNet backend or direct 1:1 mapping doesn’t exist
NOT OK = Not supported right now
Operator | Test Coverage | Mxnet (Import) | Mxnet (Export) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Abs | Yes | OK | OK | ||||||||||||
Acos | Yes | OK | OK | ||||||||||||
Add | Yes | OK | OK | ||||||||||||
And | Yes | OK | OK | ||||||||||||
ArgMax | Yes | OK | OK | ||||||||||||
ArgMin | Yes | OK | OK | ||||||||||||
Asin | Yes | OK | OK | ||||||||||||
Atan | Yes | OK | Ok | ||||||||||||
AveragePool | Yes | OK | OK | ||||||||||||
BatchNormalization | Yes | OK | OK | ||||||||||||
Cast | Yes | OK | OK | ||||||||||||
Ceil | Yes | OK | OK | ||||||||||||
Clip | Yes | OK | OK | ||||||||||||
Concat | Yes | OK | OK | ||||||||||||
Constant | Yes | OK | |||||||||||||
Conv | Yes | OK | OK | ||||||||||||
ConvTranspose | Yes | OK | OK | ||||||||||||
Cos | Yes | OK | OK | ||||||||||||
Crop | OK | ||||||||||||||
DepthToSpace | Yes | OK | NOT OK, under development | ||||||||||||
Div | Yes | OK | OK | ||||||||||||
Dropout | Yes | OK | OK | ||||||||||||
Elu | Yes | OK | OK | ||||||||||||
Equal | Yes | OK | 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 | OK, In review | ||||||||||||
GlobalMaxPool | Yes | OK | OK | ||||||||||||
Greater | Yes | OK | OK | ||||||||||||
HardSigmoid | Yes | OK | OK | ||||||||||||
Hardmax | Yes | OK | NOT OK | ||||||||||||
Identity | NOT OK | OK, In review | |||||||||||||
If | |||||||||||||||
InstanceNormalization | Yes | OK, In review | OK | ||||||||||||
LRN | Yes | OK | OK | ||||||||||||
LSTM | NOT OK, under development | ||||||||||||||
LeakyRelu | Yes | OK | OK | ||||||||||||
Less | Yes | OK | OK | ||||||||||||
Log | Yes | OK | OK | ||||||||||||
LogSoftMax | Yes | OK | OK | ||||||||||||
Loop | |||||||||||||||
LpNormalization | Yes | OK, In review | |||||||||||||
LpPool | Yes | OK | |||||||||||||
LpPoolMatMul | Yes | OK | OK, In review | ||||||||||||
Max | Yes | OK | OK | ||||||||||||
MaxPool | Yes | OK | OK | ||||||||||||
MaxRoiPool | Yes | OK | OK, In review | ||||||||||||
Mean | Yes | OK | OK | ||||||||||||
Min | Yes | OK | OK | ||||||||||||
Mul | Yes | OK | OK | ||||||||||||
Multinomial | Yes | OK | OK | ||||||||||||
Neg | Yes | OK | OK | ||||||||||||
Not | Yes | OK | OK | ||||||||||||
Or | Yes | OK | 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 | OK | ||||||||||||
RandomNormalLike | Yes | OK | OK | ||||||||||||
RandomUniform | Yes | OK | OK | ||||||||||||
RandomUniformLike | Yes | OK | OK | ||||||||||||
Reciprocal | Yes | OK | OK | ||||||||||||
ReduceL1 | Yes | OK | OK | ||||||||||||
ReduceL2 | Yes | OK | OK | ||||||||||||
ReduceLogSum | Yes | OK | NOT OK | ||||||||||||
ReduceLogSumExp | Yes | OK | NOT OK | ||||||||||||
ReduceMax | Yes | OK | OK | ||||||||||||
ReduceMean | Yes | OK | OK | ||||||||||||
ReduceMin | Yes | OK | OK | ||||||||||||
ReduceProd | Yes | OK | OK | ||||||||||||
ReduceSum | Yes | OK | OK | ||||||||||||
ReduceSumSquare | Yes | OK | NOT OK | ||||||||||||
Relu | Yes | OK | OK | ||||||||||||
Reshape | Yes | OK | OK | ||||||||||||
Selu | Yes | OK | OK | ||||||||||||
Shape | NOT OK, under development | OK | |||||||||||||
Sigmoid | Yes | OK | OK | ||||||||||||
Sin | Yes | OK | OK | ||||||||||||
Size | Yes | OK | OK | ||||||||||||
Slice | Yes | Partial, supports axis=1 | OK | ||||||||||||
Softmax | Yes | OK | OK | ||||||||||||
Softplus | Yes | OK | OK | ||||||||||||
Softsign | Yes | OK | OK | ||||||||||||
SpaceToDepth | Yes | OK | 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 | Yes | OK | OK | ||||||||||||
Tanh | Yes | OK | OK | ||||||||||||
Tile | Yes | NOT OK, under development | NOT OK, under development | ||||||||||||
TransposeTopK | Yes | OK, in review | OK, in review | ||||||||||||
TransposeXor | Yes | OK | OK | ||||||||||||
experimental ATenUnsqueeze | Yes | NOT OK, under development | experimental Affine | NOT OK, under development | experimental ConstantFill | NOT OK, under development | experimental Crop | NOT OK, under development | In review | OK | |||||
Upsample | Yes | OK, in review | OK, in review | ||||||||||||
Xor | Yes | OK | OK | ||||||||||||
experimental ATen | NOT OK | ||||||||||||||
experimental Affine | NOT OK | ||||||||||||||
experimental ConstantFill | NOT OK | ||||||||||||||
experimental GRUUnit | NOT OK | ||||||||||||||
experimental GivenTensorFill | NOT OK | experimental FC | NOT OK, under development | experimental GRUUnit | NOT OK, under development | experimental GivenTensorFill | NOT OK, under development | experimental Identity | NOT OK, under development | ||||||
experimental ImageScaler | Yes | OK, In review | |||||||||||||
experimental MeanVarianceNormalizationLoopIndex | NOT OK | ||||||||||||||
experimental MeanVarianceNormalization | NOT OK, under development | ||||||||||||||
experimental ParametricSoftplus | NOT OK, under development | ||||||||||||||
experimental Scale | NOT OK, under development | ||||||||||||||
experimental ScaledTanh | NOT OK, under development | ||||||||||||||
experimental ThresholdedRelu | NOT OK, under development | experimental Upsample | OK, In review |
...
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 |
...