- 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 (최근 30일)
이전 댓글 표시
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
답변 (2개)
Toshiaki Takeuchi
2015년 9월 1일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!