zl程序教程

您现在的位置是:首页 >  其他

当前栏目

DL之LeNet-5:LeNet-5算法的简介(论文介绍)、架构详解、案例应用等配图集合之详细攻略

2023-09-14 09:04:47 时间

DL之LeNet-5:LeNet-5算法的简介(论文介绍)、架构详解、案例应用等配图集合之详细攻略

 

 

 

目录

LeNet-5算法的简介(论文介绍)

LeNet-5算法的架构详解

1、LeNet-5 结构分析

2、各层详细说明

3、以手写数字3为例详细理解LeNet-5算法过程

4、LeNet-5为例可视化

5、LeNet-5算法的设计思路

LeNet-5算法的案例应用

1、LeNet-5算法的代码实现(LeNet-5——PyTorch)

核心代码


 

 

 

相关文章
DL之CNN(paper):关于CNN(卷积神经网络)经典论文原文(1950~2018)简介、下载地址大全(非常有价值)之持续更新(吐血整理)
DL之LeNet-5:LeNet-5算法的简介(论文介绍)、架构详解、案例应用等配图集合之详细攻略
DL之LeNet-5:LeNet-5算法的架构详解

LeNet-5算法的简介(论文介绍)

       LeNet-5模型是Yann LeCun教授于1998年在论文《Gradient-based learning applied to document recognition》中提出。它是第一个成功应用于手写数字识别问题并产生实际商业(邮政行业)价值的卷积神经网络。

Abstract
      Multilayer neural networks trained with the back-propagation algorithm constitute the best example of a successful gradient based learning technique. Given an appropriate network architecture, gradient-based learning algorithms can be used to synthesize a complex decision surface that can classify high-dimensional patterns, such as handwritten characters, with minimal preprocessing. This paper reviews various methods applied to handwritten character recognition and compares them on a standard handwritten digit recognition task. Convolutional neural networks, which are specifically designed to deal with the variability of 2D shapes, are shown to outperform all other techniques. 
      利用反向传播算法训练的多层神经网络构成了一种成功的基于梯度的学习技术。在适当的网络结构下,基于梯度的学习算法可以用来合成一个复杂的决策曲面,该曲面可以用最少的预处理对高维模式(如手写字符)进行分类。本文综述了手写字符识别的各种方法,并在一个标准的手写数字识别任务上进行了比较。卷积神经网络是专门设计用来处理二维形状变化的,它的表现优于其他所有技术。
      Real-life document recognition systems are composed of multiple modules including field extraction, segmentation recognition, and language modeling. A new learning paradigm, called graph transformer networks (GTN), allows such multimodule systems to be trained globally using gradient-based methods so as to minimize an overall performance measure
      现实生活中的文档识别系统由多个模块组成,包括字段提取、分割识别和语言建模。一种新的学习范式称为图变网络(GTN),它允许使用基于梯度的方法对这种多模块系统进行全局训练,从而最小化总体性能度量
      Two systems for online handwriting recognition are described. Experiments demonstrate the advantage of global training, and the flexibility of graph transformer networks. 
      介绍了两种在线手写识别系统。实验表明,该方法具有全局训练的优点,并具有图形变压器网络的灵活性。
      A graph transformer network for reading a bank cheque is also described. It uses convolutional neural network character recognizers combined with global training techniques to provide record accuracy on business and personal cheques. It is deployed commercially and reads several million cheques per day.
​​​​​​​      本论文还描述了一种用于读取银行支票的图形变压器网络。它使用卷积神经网络字符识别器,结合全局训练技术,为企业和个人支票提供准确的记录。它已投入商业使用,每天可读取数百万张支票。

 

论文
https://ieeexplore.ieee.org/document/726791
http://yann.lecun.com/exdb/publis/pdf/lecun-01a.pdf

1998 年《Gradient-Based Learning Applied to Documnet Recognition》
http://yann.lecun.com/exdb/lenet/

 

 

 

LeNet-5算法的架构详解

DL之LeNet-5:LeNet-5算法的架构详解

 

 

 

LeNet-5算法的案例应用

PyTorch之LeNet-5:利用PyTorch实现最经典的LeNet-5卷积神经网络对手写数字图片识别CNN

 

1、LeNet-5算法的代码实现(LeNet-5——PyTorch)

 

核心代码

PyTorch:利用PyTorch实现搭建最经典的LeNet卷积神经网络CNN——Jason niu

class LeNet(nn.Module):
    def __init__(self):
        super(LeNet,self).__init__()
        #Conv1 和 Conv2:卷积层,每个层输出在卷积核(小尺寸的权重张量)和同样尺寸输入区域之间的点积;
        self.conv1 = nn.Conv2d(1,10,kernel_size=5)
        self.conv2 = nn.Conv2d(10,20,kernel_size=5)
        self.conv2_drop = nn.Dropout2d()
        self.fc1 = nn.Linear(320,50)
        self.fc2 = nn.Linear(50,10)

    def forward(self,x):
        x = F.relu(F.max_pool2d(self.conv1(x),2)) #使用 max 运算执行特定区域的下采样(通常 2x2 像素);
        x = F.relu(F.max_pool2d(self.conv2_drop(self.conv2(x)),2))
        x = x.view(-1, 320)
        x = F.relu(self.fc1(x))  #修正线性单元函数,使用逐元素的激活函数 max(0,x);
        x = F.dropout(x, training=self.training) #Dropout2D随机将输入张量的所有通道设为零。当特征图具备强相关时,dropout2D 提升特征图之间的独立性;
        x = self.fc2(x)
        return F.log_softmax(x, dim=1)  #将 Log(Softmax(x)) 函数应用到 n 维输入张量,以使输出在 0 到 1 之间。

#创建 LeNet 类后,创建对象并移至 GPU
model = LeNet()
cuda_gpu = torch.cuda.is_available()
if cuda_gpu:
    model.cuda()

print ('MNIST_net model:\n')
print (model)