Neural network demos not working Matlab 2017b
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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.
Antworten (1)
Greg Heath
am 4 Nov. 2017
Bearbeitet: Greg Heath
am 4 Nov. 2017
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 Kommentare
Flavio Lorenzelli
am 17 Nov. 2017
Bearbeitet: Walter Roberson
am 17 Nov. 2017
Walter Roberson
am 17 Nov. 2017
Try
restoredefaultpath
and then running again. I suspect you might have a conflicting routine on your path.
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!