資源簡介
%% 這個例子展示了如何創建和訓練一個簡單的卷積神經網絡用于深度學習分類。
%% 卷積神經網絡是深度學習的重要工具,尤其適用于圖像識別。
代碼片段和文件信息
%%?Time:2019.3.7
%%?Name:Michael?Beechan
%%?Function:
%%?這個例子展示了如何創建和訓練一個簡單的卷積神經網絡用于深度學習分類。
%%?卷積神經網絡是深度學習的重要工具,尤其適用于圖像識別。
%%?Load?and?explore?image?data.
%%?Define?the?network?architecture.
%%?Specify?training?options.
%%?Train?the?network.
%%?Predict?the?labels?of?new?data?and?calculate?the?classification?accuracy.
%%?加載數據并存儲
digitDatasetPath?=?fullfile(matlabroot?‘toolbox‘?‘nnet‘?‘nndemos‘?...
????‘nndatasets‘?‘DigitDataset‘);
imds?=?imageDatastore(digitDatasetPath?...
????‘IncludeSubfolders‘?true?‘LabelSource‘?‘foldernames‘);
%%?隨機顯示數據
figure;
perm?=?randperm(10000?20);
for?i?=?1?:?20
????subplot(4?5?i);
????imshow(imds.Files{perm(i)});
end
%%?計算每個類別中的圖像數量
labelCount?=?countEachLabel(imds)
%%?指定圖像大小尺寸28*28*1
img?=?readimage(imds?1);
size(i
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-03-07?16:49??DLClassifiction\
?????文件????????2204??2019-03-07?16:42??DLClassifiction\classDL.m
- 上一篇:現代數字信號處理 姚天任 中文版課件
- 下一篇:msp430按鍵控制LED
評論
共有 條評論