Maximum variable size allowed by the program is exceeded

2 次查看(过去 30 天)
Hello, here is my code. My input is a 1080x14 matrix of doubles and target is 6x14 binary matrix. I keep getting this errors: "Error using zeros Maximum variable size allowed by the program is exceeded." "Error in nnMex2.codeHints (line 117) hints.TEMP = zeros(1,ceil(tempSize/8),'double');" The code works correclty with different data files. If someone can help me, thank you in advance.
input=importdata('input.txt');
target=importdata('output.txt');
target=target'; %size(input)= 6x14
input=input'; %size(target)= 1080x14
%initialize the network parameters
trainFcn = 'trainrp'; %training function
inputDelays = 1:4; %the delay
hiddenLayerSize = [30,20];
net = timedelaynet(inputDelays,hiddenLayerSize,trainFcn);
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
net.trainParam.epochs = 1000;
[trainP,valP,testP] = divideblock(input,0.7,0.15,0.15);
[trainT,valT,testT] = divideblock(target,0.7,0.15,0.15);
net = init(net);
%training
[net,tr] = train(net,[trainP,valP,testP],[trainT,valT,testT]);

采纳的回答

Greg Heath
Greg Heath 2017-5-11
编辑:Greg Heath 2017-5-11
The numbers you have make no sense. Typically
1. The number of samples is much greater than the dimensionality
[ I N ] = size(input)
[ O N ] = size(target)
with
N >> max(I,O)
for example
N >~ 10 * max(I,O)
and sometimes (e.g., low SNR)
N >~ 30* max(I,O)
2. The number of training equations is much greater than the number of unknown weights.
a. For an I-H-O net
0.7*N*O >> (I+1)*H +(H+1)*O
b. For an I-H1-H2-O net
0.7*N*O >> (I+1)*H1+(H1+1)*H2+(H2+1)*O
Hope this helps.
Greg

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by