当前位置:网站首页>[Deep Learning] Let's talk about what is convolutional neural network and what does convolution mean?
[Deep Learning] Let's talk about what is convolutional neural network and what does convolution mean?
2022-08-09 05:38:00 【Lin Xi 07】
目录
卷积
在泛函分析中,卷积、旋积或褶积(英语:Convolution)是通过两个函数f和g生成第三个函数的一种数学运算,其本质是一种特殊的积分变换,表征函数f与g经过翻转和平移的重叠部分函数值乘积对重叠长度的积分.
We can easily get the following formula.Direct see formula and concept is very abstract,So let's look at the following examples.
举个例子
假如有一个人24Hours of uninterrupted eat food,So eat can be expressed in the image below.Horizontal feeding time,The amount of longitudinal axis is eating.
But one can't only eat,So he will digest.So digestion can also use a table to show.The horizontal axis shows digestion time,The vertical axis shows the proportion of corresponding time you digest.时间越长 The more you will absorb.
So at this time:下午2The human body what food?
Don't eat regularly,And continuous digestion is a dynamic process,Is not so easy to calculate.But the convolution can be a very good solution to the problem for you.
解决方法
这里设 f
Function is said to eat,g
Function according to digest.
If we don't consider digest,We just need to the amount of each feeding an accumulator can be.The reaction to the figure is o[0,14]Point of a regional area.
但是,He ate the things would have been to digest,So simplef函数是远远不够的,If the person is12Something to eat a bowl of rice,So in the afternoon2How much is left point?这里就需要看g函数了.
从12吃米饭,到下午2Point to share2小时,那么我们就需要看g函数在2How much is left after hours a percentage of the food.Then we can get a formula residue = f(12) * g(14 - 12)
.Then we can get a feeding point in the afternoon2Point with the amount of food.
So we have to calculate all the last remaining quantity of food,需要在[0,14]Point of the interval to eat all the food can be a calculated.假如我们在xTime to eat,计算tHow much is left time food.可以得到一个公式.
我们仔细看f的参数和gThe parameters of the recently putx消掉,The convolution of a sign.接下来我们聊一聊x
和g-x
分别表示什么含义.
假如我们TTime to eat,那么对应在g函数就是0时刻,There will be such a in the figure below attachment.
So will be eating all the time a connection is the appearance of the image below.
So this time we will have a combined integral formula:
Now we launch to formula and convolution formula is only the differences of symbolic,其他均相同.我们的[0,t]表示的是时间,All can't be negative,There is a certain physical meaning.
总结
有一个系统,input不稳定 output稳定,Then we can take convolution to calculate this value.
神经网络中的卷积
Convolution neural network main role is to identify some features of images.Such as getting faces in images、以及面部表情等.
像素、灰度值
For example, this is a resolution of images80*40照片,Which I did a zoom processing.We can see that it has a lot of small square.Here each pane is a pixel.The grey value is that each gridRGBCorresponding numerical color.
卷积操作
Convolution operation is to use a two-dimensional convolution kernels in a batch on scanning images.
这里我们以一个3*3The convolution kernels of demo.Convolution kernels with images corresponding to multiply two position,得到9Set of results and then sum,Get a new pixel.
但是呢,So after processing the image,After a circle less.
所以引入Padding
:In order to make the matrix dimensions of input and output matrix of uniform,We will be in the input matrix outer circle to fill0像素,So you can get the picture of the same size.
思考
It don't seem to be very consistent and said in front of the convolution operation. 哪个是f函数,哪个是g函数?
Image convolution operation is to take pictures and convolution kernels after multiplying together.The front and said the convolution method is the same.
Then we can draw pictures and convolution kernels is necessarily af另一个是g.Because the picture is constantly changing,The convolution kernels is all the same.
卷积核作用
Around a lot of pixels on the impact of a certain pixel.
为什么这么说呢,Look at the following several kinds of convolution kernels after the operation effect of the.
平滑卷积
Smooth convolution is will become more smooth images、朦胧.
Here a picture of a textbook, for example.For smooth before the left side of the picture,The right to smooth after pictures.We can clearly feel the difference.
周围的像素点是如何对当前像素点产生影响的,Theory from a circle around the pixels pixels to infinity as the influence of the current pixel.But when we need to consider only the round will solve the problem would never consider two laps,Efficiency.
Convolution kernels and horizontal vertical boundary convolution kernels
We can see the figure below,Vertical boundaries convolution kernels is only give out the vertical lines,Ignore the horizontal lines.
Horizontal boundaries convolution kernels is only give out the horizontal lines.
So long as we choose convolution kernels of appropriate,Can last for implementing image filtering and then want to save characteristics of.
Convolution kernels in mathematical calculations
令x,yIs the location of a point on the image.So we draw a formula:f(x, y) * g(x, y) = ∑ f(x, y) · g(m-x, n-y)
这里为了方便计算.卷积核为3*3的,Only consider a circle around to the influence of the current pixel.
Corresponding relationship should be like this:
f(x-1, y-1) * g(1, 1) ;
f(x, y-1) * g(x+1, 1) ;
f(x+1, y-1) * g(-1, 1) ;
f(x-1, y) * g(1, 0) ;
f(x, y) * g(0, 0) ;
f(x, y-1) * g(0, 1) ;
f(x-1, y+1) * g(1, -1) ;
f(x, y+1) * g(0, -1) ;
f(x+1, y+1) * g(-1, -1) ;
Carefully found is justgThe table upside down.
所以我们发现gFunction is not equal to the convolution kernel.Because convolution kernels is not for flip operation.
卷积神经网络
Convolutional neural networks are commonly used to do image recognition,Like this situation,输入x/o通过卷积神经网络(CNN)You can recognize they arex还是o.
Not only can identify the neat this image,Like below this kind of irregular also can identify the.
Here I simplify the pixel values,Think black is-1,白色是1.
We can rulexAnd irregularx进行对比.Found that although they are not the same,But there are the same part of the local.
So the first step on the convolutional neural network is the local characteristics of the image is extracted.And then the local characteristics to the neural network.Then the neural network for judging.
Here, we can use a three convolution check features are extracted.Upper left to lower right respectively as1,x的位置是1,Lower left to upper right are1.
Below this kind of situation is just match.最后结果为1;
Then all the images on a convolution operation.Finally we can draw three after the convolution image.
As for after the pooling of、Behind the normalization, etc.
边栏推荐
猜你喜欢
A day to learn a public company: Sophia
74HC595 的使用
进程和计划任务管理
筑牢安全“防火墙”河南通许县冯庄乡开展消防培训
Distributed timing task framework xxl-job source code analysis
RT201 Domestic PA RF Power Amplifier Compatible with RFX2401C
The request was rejected because the URL contained a potentially malicious String “//“
Zuul---路由功能
shell函数、数组
pytorch实现GAN入门案例
随机推荐
aur安装报错一个或多个文件没有通过有效性检查!
废品回收小程序、APP UNIAPP开发带有用户端和回收员端
FastDFS快速使用及介绍
Spark源码-任务提交流程-8-DAGScheduler任务切分
数据库事务&锁机制
一天学习一家上市公司:索菲亚
Anonymous shared memory ashmem
The development trend of software testing
Zuul---路由功能
力扣242-有效的字母异位词——哈希表法
面向6G的大规模MIMO通信感知一体化:现状与展望
shell函数
【LeetCode】287. 寻找重复数
CSDN使用方法
What is it like to work at Kuaishou?
Lock wait timeout exceeded; try restarting transaction 更新数据量范围太大,导致锁表惨案
屏:全贴合工艺之GF、GF2、G1F1、GG、TOL
多字段关联校验
进程和计划任务管理
如何让Win11两个屏幕任务栏都显示时间?