当前位置:网站首页>【吴恩达笔记】卷积神经网络
【吴恩达笔记】卷积神经网络
2022-06-24 19:25:00 【zzu菜】
卷积神经网络
计算机视觉

计算机视觉问题例如图像识别,图像融合,物体检测等

cat的图片 64 * 64 * 3
- 前面64代表像素点高度和宽度,3代表RGB3层

这样的图片比较小,如果对于1000 * 1000 * 3,使用神经网络
- 第一层的输入,展开X_1,X_2…X_N,一共有1000 * 1000 * 3个x
- 第一层的输出,1000个节点
- 第一层的参数
- w (1000,3m)
- b (1000,1)
边界检测



这里数字越大代表亮度越大,数字越小越暗
- 输入为 6 * 6的矩阵
- 过滤器 3 * 3 或者 kernel
- 输出 4 * 4
更多的边界检测

对于过滤器有不同的值,不同进行边界检测
Padding

边界扩充,输入的矩阵经过过滤器过滤之后,输出的矩阵维度降低,为了使矩阵维度保持不变,我们可以对原来的矩阵边界进行填充数值。
- 输入矩阵: n * n eg: 6 * 6
- 填充边界: pading P=1
- 过滤器: f * f eg: 3 *3
- 输出矩阵: ( n+2P-f+1 ) * ( n+2P-f+1 )
- 输出矩阵: 6+2-3+1 =6
两种卷积方式
- valid: 无填充
- Same:Pad so that output size is the same as the input size.
卷积步长
Strided Convolutions


图片维度 : n × n
过滤器维度: f × f
填充 Padding : p
步长stride : s
三维卷积
(Convolutions overvolumes)

把三维过滤器看成小方块

然后在三维矩阵上移动 与对应的平面进行相乘相加
这里27个相乘 最后加在一起
单层卷积网络
One layer of a convolutional network

- 输入a_{0}为 6 × 6 × 3
- 过滤器相当于参数矩阵w_{1}
- z_{1}=w_{1}a_{0}+b_{1}
- a_{1}=g(z_{1}) 使用非线性函数Relu
- g代表非线性变换
- 两个过滤器 所以最后 4 × 4 × 2
If you have 10 filters that are 3 x 3 x 3 in one layer of a neural network, how many parameters does that layer have?
如果你在一个神经网络的一层中有10个3x3x3的过滤器,那么这个层有多少参数?
3 × 3 × 3 ×10+bias( 10 )=280 parameters

简单卷积网络案例
A simple convolution network example

第一层
输出结果
第二层
输出结果
第三层
输出结果
7 × 7 × 40=1960个特征
经过逻辑回归,输出最后的y值

卷积网络中一层的类型:
- Convolution CONV 卷积
- Pooling POOL 池化
- Fully connected FC 全连接
池化层
Pooling layer:Max pooling

这里 f=2 s=2
移动选取框中的最大值
Hyperparameters:
- f : filter size
- s : stride
- Max or average pooling
卷积神经网络的示例
Convolutional neural network example

注意:这里 CONV + POOL算一层,因为池化不需要求得参数
手写数字图片→ layer_1(Conv1 PooL1) →layer_2(CONV2 POOL2) → Fc3 →FC4→softmax →10 outputs
各层所需要的参数
可能不对: layer_1(Conv1 PooL1):5 × 5 × 3 × 6 +bias (6)
…
全连接层FC3: input 400 output 120
- 每个input都参与各个output的生成
- 参数:1 * 120 * 400+bias( 1 )

Why convolutions?

直接全连接需要的求的参数太多


边栏推荐
- Role of wait function
- Pattern recognition - 0 introduction
- Static routing experiment
- Return of missing persons
- Advanced secret of xtransfer technology newcomers: the treasure you can't miss mentor
- 大厂出海,败于“姿态”
- Wireshark packet capturing skills summarized by myself
- EditText 控制软键盘出现 搜索
- Codeforces Round #720 (Div. 2)
- 2022国际女性工程师日:戴森设计大奖彰显女性设计实力
猜你喜欢

Arkit与Character Creator动画曲线的对接

Auto. JS to automatically authorize screen capture permission

多路转接select

【Camera基础(一)】Camera摄像头工作原理及整机架构

(待补充)GAMES101作业7提高-实现微表面模型你需要了解的知识

Address mapping of virtual memory paging mechanism

直击“三夏”生产:丰收喜报频传 夏播紧锣密鼓

Oauth2.0 introduction

Tutorial on obtaining JD cookies by mobile browser

BPF_ PROG_ TYPE_ SOCKET_ Filter function implementation
随机推荐
关于Unity中的transform.InverseTransformPoint, transform.InverseTransofrmDirection
Alibaba cloud schedules tasks and automatically releases them
Kernel Debugging Tricks
Docking of arkit and character creator animation curves
Apple mobile phone can see some fun ways to install IPA package
Pattern recognition - 9 Decision tree
去掉录屏提醒(七牛云demo)
基于STM32的物联网下智能化养鱼鱼缸控制控制系统
Understanding openstack network
Blender's landscape
TCP specifies the source port
Interpretation of ebpf sockops code
VirtualBox virtual machine installation win10 Enterprise Edition
AntDB数据库在线培训开课啦!更灵活、更专业、更丰富
Tso hardware sharding is a header copy problem
Basic database syntax learning
Arkit与Character Creator动画曲线的对接
Bld3 getting started UI
ping: www.baidu.com: 未知的名称或服务
TDengine可通过数据同步工具 DataX读写