-
大小: 1.51MB文件類型: .7z金幣: 1下載: 0 次發(fā)布日期: 2023-09-21
- 語言: Matlab
- 標(biāo)簽: MATLAB??深度學(xué)習(xí)??LeNet??
資源簡介
MATLAB底層代碼實(shí)現(xiàn)深度學(xué)習(xí)LeNet網(wǎng)絡(luò)訓(xùn)練,用于Mnist數(shù)據(jù)集手寫識別
對于博客見:http://blog.csdn.net/love_ljq/article/details/78976452
代碼片段和文件信息
%?傳統(tǒng)意義上的卷積
%?function?result?=?convolution(imagecore)
%?????[imageSize~]?=?size(image);
%?????[coreSize~]?=?size(core);
%?????result?=?zeros(imageSize-(coreSize-1));
%?????for?rowIndex?=?1:size(result1)
%?????????for?colIndex?=?1:size(result1)
%?????????????result(rowIndexcolIndex)?=?sum(sum(double(image(rowIndex:rowIndex+coreSize-1colIndex:colIndex+coreSize-1)).*double(core)));
%?????????end
%?????end
%?end
function?result?=?convolution(imagecore)
????[imageSize~]?=?size(image);
????coreSize?=?5;
????result?=?zeros(imageSize-(coreSize-1));
????for?rowIndex?=?1:size(result1)
????????for?colIndex?=?1:size(result1)
????????????for?x?=?1:5
????????????????for?y?=?1:5
????????????????????result(rowIndexcolIndex)?=?result(rowIndexcolIndex)?+?image(rowIndex?+?x?-?1?colIndex?+?y?-?1)*double(core(11xy));
????????????????end
????????????end
????????end
????end
end
評論
共有 條評論