Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[ONNX][2.0] Progress on mx2onnx in MXNet 2.0 #20453

Open
Zha0q1 opened this issue Jul 15, 2021 · 0 comments
Open

[ONNX][2.0] Progress on mx2onnx in MXNet 2.0 #20453

Zha0q1 opened this issue Jul 15, 2021 · 0 comments

Comments

@Zha0q1
Copy link
Contributor

Zha0q1 commented Jul 15, 2021

Hi MXNet community,

I am opening this issue to track the development progress of the onnx export module, mx2onnx, on MXNet 2.0.

In MXNet 1.x, mx2onnx covers popular operators that's exposed under the Symbol namespace, and the operator unit tests utilize Gluon blocks to construct test models that consist of only one operator. However, in MXNet 2.0, the development has steered toward NumPy compatible operators and NumPy Extension operators and Gluon also moves on from using the Symbol namespace. With that said, mx2onnx will be consistent with this design choice and move toward support operators exposed under the mx.np and mx.npx namespaces.

Here's a PR to forward port mx2onnx from v1.x to master. This PR also adapts existing operator conversion functions to their equivalent np or npx operators whenever possible. With this PR we now support the following operators

## np
absolute
zeros
ones
zeors_like
ones_like
full_like
arange
reshape(naive support)
concatenate
transpose
expand_dims
add
equal (missing scalar case)
not_equal (missing scalar case)
greater (missing scalar case)
less (missing scalar case)
greater_equal (missing scalar case)
less_equal (missing scalar case)
minimum
maximum
where
add 
subtract 
multiply 
divide 
power
argmin
argmax
minimum
maximum
min
max
mean
sum
prod
mod
swapaxes
log2
reciprocal
power
sqrt
square
logical_and
logical_xor
logical_or
broadcast_to
clip
logical_not
tile
sin
cos
tan
tanh
arcsin
arccos
arctan
exp
log
ceil
floor
squeeze
negative

## npx
slice
arange_like
layer_norm
sequence_mask
reshape(naive support)
fully_connected
leaky_relu
activation
dropout
cast
softmax
box_nms
broadcast_greater
topk
box_decode
reshape_like
gather_nd
slice_channel
broadcast_like
pooling
roi_pooling
convolution
decovolution
pad
instance_norm
shape_array
log_softmax
norm
sequence_reverse
one_hot
batch_norm
slice_channel

Further works on mx2onnx should include:

  1. Add more conversion functions for the rest of np and npx operators so we have a better coverage
  2. Add model level tests. Currently we only have operator unit tests as there are no model developed with only the new np and npx operators.
  3. Code clean up: we can remove the deprecated operator conversion functions
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant