我正在學習用MATLAB例子NN工具箱,我已經得到了所有的時間誤差出的記憶 - 默認MATLAB數據庫和代碼
內存不足。爲您的 選項鍵入HELP MEMORY。 test2中的錯誤(第10行)xTest = zeros(inputSize,numel(xTestImages));
這裏是我的簡單代碼
% Get the number of pixels in each image
imageWidth = 28;
imageHeight = 28;
inputSize = imageWidth*imageHeight;
% Load the test images
[xTestImages, outputs] = digittest_dataset;
% Turn the test images into vectors and put them in a matrix
xTest = zeros(inputSize,numel(xTestImages));
for i = 1:numel(xTestImages)
xTest(:,i) = xTestImages{i}(:);
end
代碼是根據 mathwork example書面(但我嘗試做自己的自定義網絡)。我重新安裝matlab,製作最大的java RAM存儲器,清理一些磁盤空間並減少神經網絡的其餘部分。還是行不通。任何想法如何解決這個問題?
numel(xTestImages)的值是多少? – tim
@tim它來自digittest_dataset - 默認的matlab數據庫。 xTestImages是cell 1x5000 – ClassicError
這意味着,'xTest = zeros(inputSize,numel(xTestImages));'將產生一個尺寸爲28^2 * 5000 = 3,920e6個元素的矩陣。每個元素都具有雙精度(8字節),因此矩陣應該只消耗大約30mb ...命令「memory」的輸出顯示了什麼? – tim