Neural network demos not working Matlab 2017b
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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.
Risposte (1)
Greg Heath
il 4 Nov 2017
Modificato: Greg Heath
il 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 Commenti
Walter Roberson
il 17 Nov 2017
Try
restoredefaultpath
and then running again. I suspect you might have a conflicting routine on your path.
Vedere anche
Categorie
Scopri di più su Startup and Shutdown in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!