Loading Neural Network Weights inside a Loop.
2 views (last 30 days)
Show older comments
Hi everyone,
I am having a problem with the command line load command for loading neural network wieghts. I have only seen neural networks weights loaded with the following function.
load Netc.mat netc
I would like to load the neural network weights within a for loop (Netc.mat would be replaced with a new file name such as 'Netc_A.mat' 'Netc_B.mat'...etc.). I have tried a work around such as:
FileLetter = {'A' 'B'}
Filename = strcat('Netc_',FileLetter(1));
netc = load(char(Filename),'-mat')
This successfully loads netc as a structure which when using the following function:
[Y,perf] = sim(netc, Inputs);
Produces the error:
'Undefined function 'sim' for input arguments of type 'struct'.'
Does anyone have any idea on a workaround? For some reason when I load the file with the command line load command it keeps (load Netc.mat netc) netc as a network while netc = load('Netc.net') is a structure.
Thanks ahead of time,
Justin
0 Comments
Answers (0)
See Also
Categories
Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!