NetworkWrongType: First argument must be a SeriesNetwork, DAGNetwork, dlnetwork, or layerGraph.

12 Ansichten (letzte 30 Tage)
Hi,
I am a beginner in the deep learning toolbox of Matlab, so I apologize if my question seems too simple. I created a simple network using the 'feedforwardnet' function (MyNet = feedforwardnet([10]);). After training the network, I want to export it for use in Fortran. The first step is to export the network using exportONNXNetwork . I did this as follows:
filename = "MyNet.onnx";
exportONNXNetwork(MyNet,filename)
And I got an error message saying:
Error using nnet.internal.cnn.onnx.exportONNXNetwork>iValidateNetwork (line 62)
First argument must be a SeriesNetwork, DAGNetwork, dlnetwork, or layerGraph.
Does that mean that feedforwardnet is not a valid type of network for export??

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 8 Feb. 2023
feedforward networks are "shallow" networks. Export to onyx only supports "deep" networks.
(I do not whether onyx networks support functionality equivalent to shallow networks. I do not know much about onyx networks)
  3 Kommentare
mary
mary am 8 Feb. 2023
@Walter Roberson@Divyank Could you recommend one of these networks that can replace Feedforwardnet ? My input and output data are not of image type and my objective is to do a regression rather than classification. Could you please tell me where I can read about the differences of these networks? and if possible, where can I find simple examples of their applications ?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Divyank
Divyank am 8 Feb. 2023
Hello @mary, that's correct, 'feedforwardnet' is not a supported network type for export to ONNX format using the exportONNXNetwork function. You need to use either a 'SeriesNetwork', 'DAGNetwork', 'dlnetwork', or 'layerGraph' type of network for export to ONNX. For more information please refer to the following documentation: Export Network to ONNX model format

Kategorien

Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by