Fail to export net to ONNX

9 次查看(过去 30 天)
I'm trying to use the exportONNXNetwork function, in order to load it later into CNTK, but I'm getting a lot of warnings that I don't understand. I was hoping to get some pointers on what they might mean.
>> load('netTry.mat')
>> netFileToOMX = 'netFileToOMX_try1';
>> exportONNXNetwork(net,netFileToOMX);
This is the code i'm using, and here are the warnings:
A bunch of these:
Warning: ONNX does not support layer 'nnet.cnn.layer.Image3DInputLayer'. Exporting to ONNX operator 'com.MathWorks.Placeholder'.
> In nnet.internal.cnn.onnx.NNTLayerConverter.makeLayerConverter (line 173)
In nnet.internal.cnn.onnx.ConverterForNetwork/networkToGraphProto (line 80)
In nnet.internal.cnn.onnx.ConverterForNetwork/toOnnx (line 44)
In nnet.internal.cnn.onnx.exportONNXNetwork (line 34)
In exportONNXNetwork (line 40)
Warning: ONNX does not support layer 'nnet.cnn.layer.Convolution3DLayer'. Exporting to ONNX operator 'com.MathWorks.Placeholder'.
> In nnet.internal.cnn.onnx.NNTLayerConverter.makeLayerConverter (line 173)
In nnet.internal.cnn.onnx.ConverterForNetwork/networkToGraphProto (line 80)
In nnet.internal.cnn.onnx.ConverterForNetwork/toOnnx (line 44)
In nnet.internal.cnn.onnx.exportONNXNetwork (line 34)
In exportONNXNetwork (line 40)
Warning: ONNX does not support layer 'nnet.cnn.layer.Convolution3DLayer'. Exporting to ONNX operator 'com.MathWorks.Placeholder'.
> In nnet.internal.cnn.onnx.NNTLayerConverter.makeLayerConverter (line 173)
In nnet.internal.cnn.onnx.ConverterForNetwork/networkToGraphProto (line 80)
In nnet.internal.cnn.onnx.ConverterForNetwork/toOnnx (line 44)
In nnet.internal.cnn.onnx.exportONNXNetwork (line 34)
In exportONNXNetwork (line 40)
And finally this:
Error using nnet.internal.cnn.onnx.ConverterForSoftmaxLayer/toOnnx (line 32)
Assertion failed.
Error in nnet.internal.cnn.onnx.ConverterForNetwork/networkToGraphProto (line 81)
[nodeProto, paramInitializers, paramInputs, netInputs, netOutputs, layerMap] = toOnnx(layerConverter, TensorNameMap);
Error in nnet.internal.cnn.onnx.ConverterForNetwork/toOnnx (line 44)
modelProto.graph = networkToGraphProto(this);
Error in nnet.internal.cnn.onnx.exportONNXNetwork (line 34)
modelProto = toOnnx(converter);
Error in exportONNXNetwork (line 40)
nnet.internal.cnn.onnx.exportONNXNetwork(Network, filename, varargin{:});
Any help appreciated.

采纳的回答

Don Mathis
Don Mathis 2019-4-12
I don't think you'll be able to export 3d image networks until the support package supports it (expected later this year). If you're able to post your network here, I could see if there are any other potential issues besides the 3d Conv layers.
  3 个评论
Don Mathis
Don Mathis 2019-5-20
Yes, the ONNX Converter support package is being actively developed by MathWorks. However, we have a policy not to estimate when, or even if, specific future features will be available. So I can't make any promises beyond saying that exporting 3d networks is considered highly important to us.
Patrick ONeal
Patrick ONeal 2019-5-20
Understood! Much appreciated.

请先登录,再进行评论。

更多回答(1 个)

Don Mathis
Don Mathis 2019-4-11
Unfortunately, exporting 3D layers to ONNX is not yet supported.

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

产品


版本

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by