Error when trying to export a trained deep learning model to ONNX format in MATLAB due to the “SplitComplexInputs”
I followed the tutorial on MATLAB’s official website for modulation classification using deep learning:
Modulation Classification with Deep Learning
After training the network, I attempted to export the trained model to ONNX using the following command:
exportONNXNetwork(trainedNet, "www.onnx");
However, I received the following error message:
Error using nnet.internal.cnn.onnx.ConverterForSequenceInputLayer/toOnnx (line 55)
Unsupported input layer option for layer ‘Input Layer’. To export networks with an
input layer, the SplitComplexInputs property must be 0 (false).
Error in nnet.internal.cnn.onnx.ConverterForNetwork/networkToGraphProto (line 109)
= toOnnx(layerConverter, nodeProtos, TensorNameMap, TensorLayoutMap);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in nnet.internal.cnn.onnx.ConverterForNetwork/toOnnx (line 45)
modelProto.graph = networkToGraphProto(this);
^^^^^^^^^^^^^^^^^^^^^^^^^
Error in nnet.internal.cnn.onnx.exportONNXNetwork (line 22)
modelProto = toOnnx(converter);
^^^^^^^^^^^^^^^^^
Error in exportONNXNetwork (line 44)
nnet.internal.cnn.onnx.exportONNXNetwork(Network, filename, varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It seems that my network’s input layer has the SplitComplexInputs property set to true, which prevents ONNX export. How can I modify the network to allow exporting it in ONNX format for use in Python?I followed the tutorial on MATLAB’s official website for modulation classification using deep learning:
Modulation Classification with Deep Learning
After training the network, I attempted to export the trained model to ONNX using the following command:
exportONNXNetwork(trainedNet, "www.onnx");
However, I received the following error message:
Error using nnet.internal.cnn.onnx.ConverterForSequenceInputLayer/toOnnx (line 55)
Unsupported input layer option for layer ‘Input Layer’. To export networks with an
input layer, the SplitComplexInputs property must be 0 (false).
Error in nnet.internal.cnn.onnx.ConverterForNetwork/networkToGraphProto (line 109)
= toOnnx(layerConverter, nodeProtos, TensorNameMap, TensorLayoutMap);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in nnet.internal.cnn.onnx.ConverterForNetwork/toOnnx (line 45)
modelProto.graph = networkToGraphProto(this);
^^^^^^^^^^^^^^^^^^^^^^^^^
Error in nnet.internal.cnn.onnx.exportONNXNetwork (line 22)
modelProto = toOnnx(converter);
^^^^^^^^^^^^^^^^^
Error in exportONNXNetwork (line 44)
nnet.internal.cnn.onnx.exportONNXNetwork(Network, filename, varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It seems that my network’s input layer has the SplitComplexInputs property set to true, which prevents ONNX export. How can I modify the network to allow exporting it in ONNX format for use in Python? I followed the tutorial on MATLAB’s official website for modulation classification using deep learning:
Modulation Classification with Deep Learning
After training the network, I attempted to export the trained model to ONNX using the following command:
exportONNXNetwork(trainedNet, "www.onnx");
However, I received the following error message:
Error using nnet.internal.cnn.onnx.ConverterForSequenceInputLayer/toOnnx (line 55)
Unsupported input layer option for layer ‘Input Layer’. To export networks with an
input layer, the SplitComplexInputs property must be 0 (false).
Error in nnet.internal.cnn.onnx.ConverterForNetwork/networkToGraphProto (line 109)
= toOnnx(layerConverter, nodeProtos, TensorNameMap, TensorLayoutMap);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in nnet.internal.cnn.onnx.ConverterForNetwork/toOnnx (line 45)
modelProto.graph = networkToGraphProto(this);
^^^^^^^^^^^^^^^^^^^^^^^^^
Error in nnet.internal.cnn.onnx.exportONNXNetwork (line 22)
modelProto = toOnnx(converter);
^^^^^^^^^^^^^^^^^
Error in exportONNXNetwork (line 44)
nnet.internal.cnn.onnx.exportONNXNetwork(Network, filename, varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It seems that my network’s input layer has the SplitComplexInputs property set to true, which prevents ONNX export. How can I modify the network to allow exporting it in ONNX format for use in Python? machine learning, deep learning, model MATLAB Answers — New Questions