LeNet-5 论文笔记

本文介绍了1998年的经典卷积神经网络LeNet-5,探讨了其在计算力和数据量限制下的历史地位,并通过TensorFlow和Keras混合实现展示了LeNet-5的架构和配置,包括两层卷积、两层池化和三层全连接层。
摘要由CSDN通过智能技术生成

LeNet-5:Gradient-Based Learning Applied to Document Recognition

1998年的LeNet-5是CNN的经典之作,但是该模型在后来未能火起来,主要原因是当时的计算力不足和数据量的不足。并且当时的SVM在可承受计算量的情况下,达到,甚至超过了神经模型。CNN虽然在当时没能受到重视,但是并没有掩盖CNN的强大能力。

下图是LeNet的架构图:

LeNet-5架构图

LeNet由两层conv,两层pool,三层fc组成。

以下是用TensorFlow和Keras混合编写的LeNet-5模型:

import tensorflow as tf
keras = tf.keras
from tensorflow.python.keras.layers import Conv2D,MaxPool2D,Dropout,Flatten,Dense

def inference(inputs,
              num_classes=10,
              is_training=True,
              dropout_keep_prob=0.5):
  '''

  inputs: a tensor of images
  num_classes: the num of category.
  is_training: set ture when it used for training
  dropout_keep_prob: the rate of dropout during training
  '''

  x = inputs
  # conv1
  x = Conv2D(6, [5,5], 1, activation='relu', name='conv1')(x) 
  # pool1
  x = MaxPool2D([2,2], 2, name='pool1')
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值