Maximum variable size allowed by the program is exceeded

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개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2017년 5월 10일

댓글:

2017년 5월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by