What´s wrong with my neural network´s training?

1 vue (au cours des 30 derniers jours)
Veronika
Veronika le 18 Mar 2015
Commenté : Veronika le 27 Mar 2015
Dear all,
I have this code for training neural network (type newff) and MATLAB is almost all day busy, but nothing happens (no training newff). Does anyone know, where is the mistake?
load ('trenovaci_modely2_stredni')
D = [stredni_tvar{1,:}];
F = [stredni_tvar{2,:}];
net_stredni_MLP = newff(D,F,20);
net.trainparam.epochs = 100;
net = train(net_stredni_MLP,D,F);
D = stredni_tvar{1,7};
J = sim(net_stredni_MLP,D);
save net_stredni_MLP
disp('Neuronová síť byla uložena')
Thank you for your answers.

Réponse acceptée

Greg Heath
Greg Heath le 19 Mar 2015
net2 = train(net1,...);
Now there are 2 nets one trained and one untrained. Which do you think is untrained?
*Thank you for formally accepting this answer*
Greg
  4 commentaires
Veronika
Veronika le 19 Mar 2015
I tried this:
load ('trenovaci_modely2_stredni')
D = [stredni_tvar{1,:}];
F = [stredni_tvar{2,:}];
net_stredni_MLP = newff(D,F,20);
net_stredni_MLP.trainparam.epochs = 100;
net_stredni_MLP = train(net_stredni_MLP,D,F);
D = stredni_tvar{1,7};
J = sim(net_stredni_MLP,D);
save net_stredni_MLP
disp('Neuronová síť byla uložena')
And still nothing, only "busy" as usual...
Veronika
Veronika le 23 Mar 2015
Today I tried another pictures (figures) for training neural network.
This is the code:
load ('trenovaci_modely4_nejmensi')
D = [nejmensi_tvar{1,:}];
F = [nejmensi_tvar{2,:}];
net_nejmensi_MLP = newff(D,F,20);
net_nejmensi_MLP.trainparam.epochs = 100;
net_nejmensi_MLP = train(net_nejmensi_MLP,D,F);
D = nejmensi_tvar{1,7};
J = sim(net_nejmensi_MLP,D);
save net_nejmensi_MLP
disp('Neuronová síť byla uložena')
And Command Window returns this:
Out of memory. Type HELP MEMORY for your options.
Error in removeconstantrows>reverse (line 262)
x = zeros(settings.xrows,q);
Error in nnproc.dperf (line 26)
AA{j+1} = processFcn.reverse(AA{j},processFcn.settings);
Error in C:\Program Files\MATLAB\R2011b\toolbox\nnet\nnutils\+nnprop\jac_s.p>jac_s (line 105)
Error in staticderiv>calc_jacobian (line 222)
jWB = nnprop.jac_s(net,data.P,data.Pd,data.Zb,data.Zi,data.Zl,...
Error in staticderiv (line 85)
out1 = calc_jacobian(in2,in3,in4);
Error in defaultderiv>calc_jacobian (line 217)
jWB = staticderiv('jacobian',net,data,fcns);
Error in nntraining.perfs_jejj>calc_Y_trainPerfJeJJ (line 87)
Jwb_y = fcns.deriv.calc_jacobian(net,signals,fcns);
Error in nntraining.perfs_jejj>singlecalc (line 58)
[Y,trainPerfy,trainN,JEy,JJy] = calc_Y_trainPerfJeJJ(net,data,fcns);
Error in nntraining.perfs_jejj (line 9)
[trainPerfy,trainN,valPerfy,~,testPerfy,~,JEy,JJy] = singlecalc(net,data,fcns);
Error in trainlm>train_network (line 199)
[perf,vperf,tperf,je,jj,gradient] = nntraining.perfs_jejj(net,data,fcns);
Error in trainlm (line 113)
[net,tr] = train_network(net,tr,data,fcns,param);
Error in network/train (line 106)
[net,tr] = feval(net.trainFcn,net,X,T,Xi,Ai,EW,net.trainParam);
Error in nejmensi (line 110)
net_nejmensi_MLP = train(net_nejmensi_MLP,D,F;
Do you know, what does it mean? Thank you for answer.

Connectez-vous pour commenter.

Plus de réponses (2)

Greg Heath
Greg Heath le 18 Mar 2015
I answered this in your previous post.
  3 commentaires
Veronika
Veronika le 19 Mar 2015
Here I attach variables D, F, J and trenovaci_modely2_stredni.
Greg Heath
Greg Heath le 19 Mar 2015
I think you better go back and reread what I wrote.

Connectez-vous pour commenter.


Greg Heath
Greg Heath le 26 Mar 2015
load('nntoolMLP.mat')
whos
% Name Size Bytes Class
%
% D 1x1 1776 cell
% F 1x1 616560 cell
% J 1x1 2160 cell
% stredni_tvar 2x301 1184736 cell
d = cell2mat(D);
f = cell2mat(F);
j = cell2mat(J);
s = cell2mat(stredni_tvar);
whos
Name Size Bytes Class
D 1x1 1776 cell
F 1x1 616560 cell
J 1x1 2160 cell
stredni_tvar 2x301 1184736 cell
d 208x1 1664 double
f 256x301 616448 double
j 256x1 2048 double
s 464x301 1117312 double
Your dimensions are not compatible.
Start by converting to doubles
Then fix the dimensions.
  1 commentaire
Veronika
Veronika le 27 Mar 2015
Ok, when I do this:
load ('trenovaci_modely2_stredni')
s = cell2mat(stredni_tvar);
D = [stredni_tvar{1,:}];
F = [stredni_tvar{2,:}];
d = cell2mat(D);
f = cell2mat(F);
j = cell2mat(J);
net_stredni_MLP = newff(D,F,20);
net_stredni_MLP.trainparam.epochs = 100;
net_stredni_MLP = train(net_stredni_MLP,D,F);
D = stredni_tvar{1,7};
J = sim(net_stredni_MLP,D);
save net_stredni_MLP
disp('Neuronová síť byla uložena')
Command Window returns this:
Cell contents reference from a non-cell array object.
Error in cell2mat (line 43)
cellclass = class(c{1});
Error in stredni (line 110)
d = cell2mat(D);

Connectez-vous pour commenter.

Catégories

En savoir plus sur Deep Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by