amaas / stanford_dl_ex

Programming exercises for the Stanford Unsupervised Feature Learning and Deep Learning Tutorial
http://ufldl.stanford.edu/tutorial
MIT License
2.59k stars 1.6k forks source link

small error in running multi-layer neural network #18

Open adaliu1 opened 8 years ago

adaliu1 commented 8 years ago

During running the "multilayer_supervised" in matlab, I got an error as below:

Reference to non-existent field 'W'. Error in stack2params (line 31) assert(mod(size(stack{d+1}.W, 2), size(stack{d}.W, 1)) == 0, ... Error in supervised_dnn_cost (line 85) [grad] = stack2params(gradStack); Error in minFunc (line 314) [f,g] = funObj(x,varargin{:}); Error in run_train (line 45) [opt_params,opt_value,exitflag,output] = minFunc(@supervised_dnn_cost,...

It seems that the error came from the ''stack2params.m''. But I do not find out where the error is in the code. I used the ''stack2params.m'' directly and do not make any modification. Is there any modification be needed? Could anyone help me with this out? Thank you so much.