- IW1_1
- x1_step1_keep
Artificial Neural Networks for Beginners - MNIST Dataset: Unable to read file 'myWeights'. No such file or directory. Can anyone help me understand what I should do successfully load weights?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am trying to follow http://blogs.mathworks.com/loren/2015/08/04/artificial-neural-networks-for-beginners/
Hopefully someone has successfully managed to follow the example and can point me in the right direction.
I have imported the data.
tr = csvread('train.csv', 1, 0); % read train.csv sub = csvread('test.csv', 1, 0); % read test.csv
Conducted data preparation.
Used the Neural Network Toolbox GUI API to create myNNfunc.m and myNNscript.m
I created VisualizingLearnedWeights.m. When I run this file I get an error message load myWeights % load the learned weights W1 =zeros(100, 28*28); % pre-allocation W1(:, x1_step1_keep) = IW1_1; % reconstruct the full matrix figure % plot images colormap(gray) % set to grayscale for i = 1:25 % preview first 25 samples subplot(5,5,i) % plot them in 6 x 6 grid digit = reshape(W1(i,:), [28,28])'; % row = 28 x 28 image imagesc(digit) % show the image end
the error message is: % Error using load % Unable to read file 'myWeights'. No such file or directory.
% Error in VisualizingLearnedWeights (line 7) % load myWeights % load the learned weights
In the workspace I can not see any weights. But I find W1. I have tried to search thru every script in order to find weights.
0 Kommentare
Antworten (2)
Toshiaki Takeuchi
am 1 Sep. 2015
You should remove "load myWeights" from your script. The blog post is like a cooking show, and it is just loading the pre-computed variables into memory. All it does is to load the following variables.
They are defined within myNNfunc.m, as the blog post says.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!