当前位置:网站首页>使用Tensorflow进行完整的深度神经网络CNN训练完成图片识别案例2
使用Tensorflow进行完整的深度神经网络CNN训练完成图片识别案例2
2022-07-03 12:45:00 【海宝7号】
未完待续。上一张链接:https://blog.csdn.net/dongbao520/article/details/125456950
卷积神经网络
• Convolutional neural networks
• 视觉皮层、感受野,一些神经元看线,一些神经元看线的
方向,一些神经元有更大的感受野,组合底层的图案
• 1998年Yann LeCun等人推出了LeNet-5架构,广泛用于手
写体数字识别,包含全连接层和sigmoid激活函数,还有卷
积层和池化层
卷积神经网络(Convolutional Neural Networks, CNN)是一类包含卷积计算且具有深度结构的前馈神经网络(Feedforward Neural Networks),是深度学习(deep learning)的代表算法之一 [1-2] 。卷积神经网络具有表征学习(representation learning)能力,能够按其阶层结构对输入信息进行平移不变分类(shift-invariant classification),因此也被称为“平移不变人工神经网络(Shift-Invariant Artificial Neural Networks, SIANN
卷积神经网络仿造生物的视知觉(visual perception)机制构建,可以进行监督学习和非监督学习,其隐含层内的卷积核参数共享和层间连接的稀疏性使得卷积神经网络能够以较小的计算量对格点化(grid-like topology)特征,例如像素和音频进行学习、有稳定的效果且对数据没有额外的特征工程(feature engineering)要求完整的原理相关可以---->>参考
对于感受野:
对于预训练的网络
复用TensorFlow模型
CNN里面最重要的构建单元就是卷积层
• 神经元在第一个卷积层不是连接输入图片的每一个像素,
只是连接它们感受野的像素,以此类推,第二个卷积层的
每一个神经元仅连接位于第一个卷积层的一个小方块的神
经元
卷积层简图

卷积运算案例:


步长为2,则有
Filter卷积核
• Convolution kernels
• Vertical line filter 中间列为1,周围列为0
• Horizontal line filter 中间行为1,周围行为0
• 7*7 matrix

在一个特征图里面,所有的神经元共享一样的参数(
weights bias),权值共享
• 不同的特征图有不同的参数

卷积训练过程
Padding模式
VALID
• 不适用zero padding,有可能会忽略图片右侧或底下,这个得看stride的设置
• SAME
• 必要会加zero padding,这种情况下,输出神经元个数等于输入神经元个数除以步长 ceil(13/5)=3

池化Pooling处理
目标就是降采样subsample,shrink,减少计算负荷,内存使用,参数数量(也可防止过拟合)• 减少输入图片大小也使得神经网络可以经受一点图片平移,不受位置的影响
• 正如卷积神经网络一样,在池化层中的每个神经元被连接到上面一层输出的神经元,只对应一小块感受野的区域。我们必须定义大小,步长,padding类型
• 池化神经元没有权重值,它只是聚合输入根据取最大或者是求均值
• 2*2的池化核,步长为2,没有填充,只有最大值往下传递

长和宽两倍小,面积4倍小,丢掉75%的输入值
• 一般情况下,池化层工作于每一个独立的输入通道,所以输出的深度和输入的深度相同
CNN架构
• 典型的CNN架构堆列一些卷积层:
• 一般一个卷积层后跟ReLU层,然后是一个池化层,然后另一些个卷积层+ReLU层,然后另一个池化层,通过网络传递的图片越来越小,但是也越来越深,例如更多的特征图!
• 最后常规的前向反馈神经网络被添加,由一些全连接的层+ReLU层组成,最后是输出层预测,例如一个softmax层输出预测的类概率
• 一个常见的误区是使用卷积核过大,你可以使用和99的核同样效果的两个33的核,好处是会有更少的参数,简化了运算。
未完待续。。
边栏推荐
- Start signing up CCF C ³- [email protected] chianxin: Perspective of Russian Ukrainian cyber war - Security confrontation and sanctions g
- CVPR 2022 image restoration paper
- Sitescms v3.0.2 release, upgrade jfinal and other dependencies
- DQL basic query
- 用户和组命令练习
- 物联网毕设 --(STM32f407连接云平台检测数据)
- Kivy教程之 盒子布局 BoxLayout将子项排列在垂直或水平框中(教程含源码)
- 服务器硬盘冷迁移后网卡无法启动问题
- Flink SQL knows why (17): Zeppelin, a sharp tool for developing Flink SQL
- Swiftui development experience: the five most powerful principles that a programmer needs to master
猜你喜欢

Flink SQL knows why (13): is it difficult to join streams? (next)

已解决(机器学习中查看数据信息报错)AttributeError: target_names

DQL basic query

Tutoriel PowerPoint, comment enregistrer une présentation sous forme de vidéo dans Powerpoint?

The difference between stratifiedkfold (classification) and kfold (regression)

Kivy tutorial how to automatically load kV files
![[Database Principle and Application Tutorial (4th Edition | wechat Edition) Chen Zhibo] [sqlserver2012 comprehensive exercise]](/img/47/78d9dd098dcb894ba1f459873d5f52.png)
[Database Principle and Application Tutorial (4th Edition | wechat Edition) Chen Zhibo] [sqlserver2012 comprehensive exercise]

Seven habits of highly effective people

Road construction issues

February 14, 2022, incluxdb survey - mind map
随机推荐
Detailed explanation of multithreading
Task5: multi type emotion analysis
Sword finger offer 14- I. cut rope
The R language GT package and gtextras package gracefully and beautifully display tabular data: nflreadr package and gt of gtextras package_ plt_ The winloss function visualizes the win / loss values
CVPR 2022 | 美团技术团队精选6篇优秀论文解读
Luogup3694 Bangbang chorus standing in line
2022-02-14 analysis of the startup and request processing process of the incluxdb cluster Coordinator
OpenHarmony应用开发之ETS开发方式中的Image组件
Flink SQL knows why (XI): weight removal is not only count distinct, but also powerful duplication
MySQL constraints
sitesCMS v3.0.2发布,升级JFinal等依赖
The principle of human voice transformer
Task6: using transformer for emotion analysis
json序列化时案例总结
开始报名丨CCF C³[email protected]奇安信:透视俄乌网络战 —— 网络空间基础设施面临的安全对抗与制裁博弈...
rxjs Observable filter Operator 的实现原理介绍
Mysqlbetween implementation selects the data range between two values
Can newly graduated European college students get an offer from a major Internet company in the United States?
解决 System has not been booted with systemd as init system (PID 1). Can‘t operate.
2022-01-27 redis cluster brain crack problem analysis