vInputs
モデルを使用しvTargets
てモデルを作成するためにニューラル ネットワークをトレーニングしよnet
うとしていますが、コードで何を修正しようとしても、このイライラするエラーが発生し続けます。
エラー: ゼロの使用中にエラーが発生しました。プログラムで許可されている最大変数サイズを超えています。
私のコードによって作成されたそのような大きなデータは見つかりません.4GBのRAMがあります
3つの部分に分類する必要がある230枚の画像があります'Sedan', 'SUV', 'Hatchback'
image size [15x26]
このコードを使用して、抽出された単一の画像の特徴gabor filter
をFeature Vector
function IMVECTOR = im2vec (img)
load Gabor;
img = adapthisteq(img);
Features75x208 = cell(5,8);
for s = 1:5
for j = 1:8
Features75x208{s,j} = mminmax(abs(ifft2(G{s,j}.*fft2(double(img),32,32),15,26)));
end
end
Features25x70 = cell2mat(Features75x208);
Features25x70 (3:3:end,:)=[];
Features25x70 (2:2:end,:)=[];
Features25x70 (:,3:3:end)=[];
Features25x70 (:,2:2:end)=[];
IMVECTOR = reshape (Features25x70,[1750 1]);
特徴ベクトルが作成された後、vInputs
230 枚の画像に対して同じ関数を使用して作成しました。したがって、私は 1.2 を得ましvInputs=[1750x230].
た。vTargets=[4x230].
しかし、実行するたびにProject
エラーが発生しfunction
ます。
function net = create_pr_net(inputs,targets)
%CREATE_PR_NET Creates and trains a pattern recognition neural network.
% Create Network
numHiddenNeurons = 35;
net = newpr(inputs,targets,numHiddenNeurons);
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
% Train and Apply Network
[net,tr] = train(net,inputs,targets);% <== ERROR OCCURS HERE<==
outputs = sim(net,inputs);
% Plot
plotperf(tr);
plotconfusion(targets,outputs);
save net net
完全なエラーは次のとおりです。
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');
Error in nncalc.setup2 (line 13)
calcHints = calcMode.codeHints(calcHints);
Error in network/train (line 306)
[calcLib,calcNet] = nncalc.setup2(calcMode,calcNet,calcData,calcHints);
Error in create_pr_net (line 14)
[net,tr] = train(net,inputs,targets);
Error in executeMe (line 22)
net=create_pr_net(vInputs,vTargets);
私を助けて、何か見逃していないか、さらに詳細を指定する必要があるかどうか尋ねてください.
の値tempSize
:
編集:私は32ビットシステムを使用しているので、一度に最大でアドレス指定できることがわかり2^32 = 4.294967e+09
ました。
64ビットを使用していた場合、一度に約アドレスを指定できます2^64 = 9.22337e+18
。
それで、私のシステムでそれを機能させる方法について、いくつかのアイデアを教えてください.