The operator mapping from MXNet's SliceChannel to ONNX Split is incorrect:
elif squeeze_axis == 0 and num_outputs > 1:
node = onnx.helper.make_node(
"Split",
[input_node],
[name],
axis=axis,
split=[num_outputs],
name=name,
)
return [node]
This means that when an array is supposed to be split into e.g. 10 evenly sized chunks (num_outputs == 10) what is exported instead is an ONNX operator that outputs one chunk of length 10, see https://github.com/onnx/onnx/blob/master/docs/Operators.md#examples-82.
It should instead read something along the lines of
elif squeeze_axis == 0 and num_outputs > 1:
node = onnx.helper.make_node(
"Split",
[input_node],
[name + "_%s" % (i) for i in range(num_outputs)],
axis=axis,
name=name,
)
return [node]
, which will require some additional changes to consumer nodes (they'll have to select which of the "Split" node outputs they need to use).
I encountered this when I exported a model of mine to ONNX and tried to reimport it to MXNet for sanity checks, but the import failed due to the unresolved https://github.com/apache/incubator-mxnet/issues/11594
Most helpful comment
PR https://github.com/apache/incubator-mxnet/pull/14121