LeNet-5网络 手写数字分类 Matlab

本文介绍了如何用Matlab实现经典的LeNet-5神经网络模型,用于手写数字的分类任务。详细代码和注释参照了相关资源链接,展示了网络模型的构建过程和实验结果。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

LeNet-5网络模型图

在这里插入图片描述
(引自https://www.cnblogs.com/wuliytTaotao/p/9544625.html)

代码如下(详情见注释,很详细):


%% 导入数据
digitDatasetPath = fullfile('./', '/train_HandWrittenDataset/');
imds = imageDatastore(digitDatasetPath, ...
    'IncludeSubfolders',true,'LabelSource','foldernames');
%imds = imageDatastore(digitDatasetPath,...
%'IncludeSubfolders',true,'FileExtensions','.jpg','LabelSource','foldernames');
tmp=[];
tmp1=[];
tmp2=[];
for i=23:44:440
    tmp=[tmp;imds.Files(i:i+21)];
end
for i=0:1:9
   tmp1=categorical(ones(22,1)*(i))
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值