필터 지우기
필터 지우기

Saving a neural network within a GUI and opening it back up

조회 수: 2 (최근 30일)
Harold
Harold 2013년 5월 1일
I'm having problems with saving a neural network and loading it back up. Refer to this post that I made in regards to loading a saved neural network ( saved from the workspace not the GUI) http://www.mathworks.com/matlabcentral/answers/74032-problems-with-a-saved-neural-network
I was having problems saving a trained neural network. I kept getting the error saying that 'handles.neural_net' is not a valid variable name. I then realized that Matlab does not like '.' in variable names. So within my save neural network callback I created a variable save_net = handles.neural_net. I used this variable in save(). This worked.
Now when I open this trained network and hit my "run neural network" button, I get an error saying 'model' parameter must be a string.
As mentioned in the link posted above, I use the code below to load the saved network. Can anyone find what I'm doing wrong with saving and loading neural networks using handles? I need to be able to use handles for the neural network because it gets passed around from the file select callback to the training or run callback (depending on if you are performing a training or run of the network).
trained_net_vars = load(FileName);
handles.neural_net = trained_net_vars.net;
Note: The training, running, and saving of the network is all done in the GUI. I want to be able to simulate the network using a different input than the input used for training.

채택된 답변

Walter Roberson
Walter Roberson 2013년 5월 1일
If the variable you are saving into is named "save_net", then the field name you used after trained_net_vars needs to be "save_net".

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by