Loading a saved deep learning network into matlab
显示 更早的评论
I am trying to import my saved vgg19 network into a different matlab script in order to perform image classification.
So I performed transfer learning on the original vgg 19 network using the code of https://nl.mathworks.com/help/deeplearning/examples/transfer-learning-using-alexnet.html. I saved to modified vgg19 network with
save net;
This creates a '.mat' file in the directory that I am currently in. However when I load this file into a new project for instance it import each variable of the network as a seperate variable. When I look what is in the 'net' variable which is a DAGNetwork as expected has 2 properties: layers and connections. But these properties don't include anything while it is expected that they include a 47x1 layer and 46x2 table.
When I look at the size of the DAGNetwork is also shows it is completely empy (0 Bytes) while I expect this to be around 500 MB.
I really don't know what I am doing wrong as I have been looking on the internet for the correct way of importing a saved network into matlab.
采纳的回答
更多回答(2 个)
Divya Gaddipati
2019-10-29
Hi,
Instead of
save net;
try using
save('net.mat', 'net');
and see if that works.
Steven Lord
2019-10-29
1 个投票
According to the documentation page for the vgg19 function "This function requires Deep Learning Toolbox™ Model for VGG-19 Network support package." Is this support package installed on the machine where you're trying to load the network? I would have expected you to receive a warning when you tried to load the network onto the machine if you don't, but it's possible to disable that warning even if I don't recommend doing so.
类别
在 帮助中心 和 File Exchange 中查找有关 Get Started with Statistics and Machine Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!