Hi Dears,
I'm facing the following error message:
Matrix dimensions must agree.
Error in nn7.grad2 (line 104)
gN{i} = Fdot .* gA{i};
Error in nn7.perfs_sig_grad (line 23)
[gB,gIW,gLW,gA] = nn7.grad2(net,trainData.Pc,trainData.Pd,...
Error in trainb>train_network (line 149)
nn7.perfs_sig_grad(net,trainData,valData,testData,needGradient,fcns);
Error in trainb (line 56)
[out1,out2] = train_network(varargin{2:end});
Error in network/train (line 353)
[net,tr] = feval(net.trainFcn,'apply',net,tr,data,calcMode.options,hints,net.trainParam);
Error in ANN2 (line 90)
[net,tr] = train(net,Xs,T);
I tried to figure-out the sources of this problem, and I get the following indication:
when I put the following command just before train command, I get:
whos net
[net,tr] = train(net,Xs,T);
Name Size Bytes Class Attributes
T 18x1000 144000 double
Xs 18x1000 144000 double
net 1x1 44008 network
Every time I run the program, the preceding error pops-up when net's bytes limit decreases down to 44008!!!
It seems to me that there is a minimum limit of network's bytes, because it happens when net's byte is less than 44008 (or it could happen when it is slightly larger than 44008)
What is the exact minimum information needed for the network, and how can we avoid the above problem?
I have checked many questions raised in this forum and no one works with me!
Thank you so much