当前位置:网站首页>【吴恩达笔记】卷积神经网络
【吴恩达笔记】卷积神经网络
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?

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


边栏推荐
- Failed to open after installing Charles without any prompt
- 关于Unity中的transform.InverseTransformPoint, transform.InverseTransofrmDirection
- RFC 793 why to send reset and when to send reset
- EditText controls the soft keyboard to search
- Simple analysis of WordPress architecture
- Apple mobile phone can see some fun ways to install IPA package
- Pattern recognition - 1 Bayesian decision theory_ P1
- VirtualBox虚拟机安装Win10企业版
- Logical backup: mysqldump vs physical backup: xtrabackup
- Analysis of BBR congestion control state machine
猜你喜欢

Simple analysis of WordPress architecture

Codeforces Round #720 (Div. 2)

memcached全面剖析–3. memcached的删除机制和发展方向

Role of wait function

煮茶论英雄!福建省发改委、市营商办领导一行莅临育润大健康事业部交流指导

Understanding openstack network

OSI and tcp/ip model

Intelligent fish tank control system based on STM32 under Internet of things

大厂出海,败于“姿态”

字节的软件测试盆友们你们可以跳槽了,这还是你们心心念念的字节吗?
随机推荐
力扣每日一题-第26天-496.下一个更大元素Ⅰ
Concepts of kubernetes components
What does CTO (technical director) usually do?
图的邻接表存储 数组实现
Tdengine can read and write through dataX
Antdb database online training has started! More flexible, professional and rich
Blender FAQs
188. the best time to buy and sell stocks IV
2022国际女性工程师日:戴森设计大奖彰显女性设计实力
CondaValueError: The target prefix is the base prefix. Aborting.
Functional analysis of ebpf tracepoint
JMeter implementation specifies concurrent loop testing
Realization of truth table assignment by discrete mathematical programming
A field in the database is of JSON type and stores ["1", "2", "3"]
VirtualBox虚拟机安装Win10企业版
Memcached comprehensive analysis – 3 Deletion mechanism and development direction of memcached
Rewrite, maplocal and maplocal operations of Charles
About transform InverseTransformPoint, transform. InverseTransofrmDirection
介绍BootLoader、PM、kernel和系统开机的总体流程
Oauth1.0 introduction