Neural network demos not working Matlab 2017b
조회 수: 1 (최근 30일)
이전 댓글 표시
Here are the commands I typed:
[x,t] = wine_dataset;
setdemorandstream(391418381)
net = patternnet(10);
view(net)
[net,tr] = train(net,xwine,twine);
at which point I get the error messages:
Index exceeds matrix dimensions.
Error in initnw>initialize_layer (line 168)
range(inputStart(j):inputStop(j),:) = temp2((inputStart(j):inputStop(j))-inputStart(j)+1,:);
Error in initnw (line 93)
out1 = initialize_layer(in1,in2);
Error in initlay>initialize_network (line 147)
net = feval(initFcn,net,i);
Error in initlay (line 89)
out1 = initialize_network(in1);
Error in network/init (line 32)
net = feval(initFcn,net);
Error in network/configure (line 243)
net = init(net);
Error in nntraining.config (line 116)
net = configure(network(net),X,T);
Error in nntraining.setup>setupPerWorker (line 68)
[net,X,Xi,Ai,T,EW,Q,TS,err] = nntraining.config(net,X,Xi,Ai,T,EW,configNetEnable);
Error in nntraining.setup (line 43)
[net,data,tr,err] = setupPerWorker(net,trainFcn,X,Xi,Ai,T,EW,enableConfigure);
Error in network/train (line 335)
[net,data,tr,err] = nntraining.setup(net,net.trainFcn,X,Xi,Ai,T,EW,enableConfigure,isComposite);
I get the same errors when I try the other demos as well. Any help is welcome. Thanks.
답변 (1개)
Greg Heath
2017년 11월 4일
편집: Greg Heath
2017년 11월 4일
close all, clear all, clc
[ x, t ] = wine_dataset;
[ I N ] = size(x) % [ 13 178 ]
[ O N ] = size(t) % [ 3 178 ]
MSEref = mean(var(t',1)) % 0.2109
setdemorandstream(391418381)
[net tr y e ] = train( patternnet, x, t);
NMSE = mse(e)/MSEref % 0.0347
Hope this helps.
Thank you for formally accepting my answer
Greg
PS: If you want to plot, remember the multidimensionality!
댓글 수: 2
Walter Roberson
2017년 11월 17일
Try
restoredefaultpath
and then running again. I suspect you might have a conflicting routine on your path.
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!