- importNetworkFromONNX: Import ONNX Network and Initialize
- importNetworkFromTensorFlow: Import and Initialize TensorFlow Network
- importNetworkFromPyTorch: Import Network from PyTorch and Initialize
Why do I get warnings and errors about an "uninitialized dlnetwork" when importing an Deep Learning network from a third-party framework (ONNX, TensorFlow, PyTorch, etc.) into MATLAB, or exporting it to Simulink?
When I import my ONNX model into MATLAB using "importNetworkFromONNX", I get the following error:
>> net = importNetworkFromONNX('model.onnx');
Warning: Returning an uninitialized dlnetwork because some input layers have unknown data formats or
undetermined image sizes. Initialize the network by passing example input data to the initialize object function.
>> net = importNetworkFromTensorFlow(modelFolder);
Warning: Network is imported as an uninitialized dlnetwork object. Before using the network, add input layer(s):
>> net = importNetworkFromPyTorch(modelfile)
Warning: Network was imported as an uninitialized dlnetwork. Before using the network, add input layer(s):
Then, when I try to import this dlnetwork into Simulink via the "exportNetworkToSimulink" function, I get an error:
>> exportNetworkToSimulink(net)
Error using exportNetworkToSimulink
Uninitialized dlnetwork object. Initialize and train network before calling exportNetworkToSimulink.
采纳的回答
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!