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

1 次查看(过去 30 天)
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.

采纳的回答

Greg Heath
Greg Heath 2015-3-19
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 个评论
Veronika
Veronika 2015-3-19
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 2015-3-23
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.

请先登录,再进行评论。

更多回答(2 个)

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

请先登录,再进行评论。


Greg Heath
Greg Heath 2015-3-26
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 个评论
Veronika
Veronika 2015-3-27
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);

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by