How upload a saved neural network in the GUI?

Illustration
Hessam - 2021-07-16T10:08:32+00:00
Question: How upload a saved neural network in the GUI?

I am creating a GUI where there are two options to choose a network to use;   -Uploading an already trained net.   -Training a Network.   For the first choice I want to have the option to go to different directory and upload it. I am using the following command, but it loads the net as a character!! net = uigetfile; handles.net=net;

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

You saved the files with .mat extension, you need load command to load them to MATLAB not dlmread or fopen.
 
 
ListOfVariables = load(uigetfile);
If you saved tr and net in one file, they all will be loaded in ListofVariables, ListOfVariables is a structure, that contains all the variables in the .mat file.
 
You can use tr an net then, in your GUI.
 
handles.tr =  ListOfVariables.tr;

 


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!