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

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


边栏推荐
- 基于STM32的物联网下智能化养鱼鱼缸控制控制系统
- Please open online PDF carefully
- Tournament sort
- 基于C语言实现的足球信息查询系统 课程报告+项目源码+演示PPT+项目截图
- [cloud native learning notes] kubernetes practice command
- 图的邻接表存储 数组实现
- Concepts of kubernetes components
- 使用 Go 编程语言 66 个陷阱:Golang 开发者的陷阱和常见错误指北
- [cloud native learning notes] learn about kubernetes' pod
- CondaValueError: The target prefix is the base prefix. Aborting.
猜你喜欢

福建省发改委福州市营商办莅临育润大健康事业部指导视察工作
![[cloud native learning notes] kubernetes Foundation](/img/c9/bd9ac90dd0dd27c450db33ad6b2fa5.jpg)
[cloud native learning notes] kubernetes Foundation

Oauth2.0 introduction

B站带货当学新东方

BPF_ PROG_ TYPE_ SOCKET_ Filter function implementation

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

Remove the screen recording reminder (seven cattle cloud demo)

ping: www.baidu. Com: unknown name or service

介绍BootLoader、PM、kernel和系统开机的总体流程

Oauth1.0 introduction
随机推荐
ping: www.baidu. Com: unknown name or service
Functional analysis of ebpf tracepoint
Concepts of kubernetes components
HCIA assessment
Multi view function in blender
Why are life science enterprises on the cloud in succession?
BPF_ PROG_ TYPE_ SOCKET_ Filter function implementation
Axi DMA IP core operation process
Slider controls the playback progress of animator animation
Understanding openstack network
升哲科技 AI 智能防溺水服务上线
Php-pdo parameter binding problem
how to install clustershell
Poj1061 frog dating (extended Euclid)
66 pitfalls in go programming language: pitfalls and common errors of golang developers
[Web Security Basics] some details
Distributed basic concepts
Analysis of tcpdump packet capturing kernel code
Visit Amazon memorydb and build your own redis memory database
Memcached comprehensive analysis – 2 Understand memcached memory storage