本文介绍了卷积神经网络中的维数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试了解卷积神经网络中维度的行为.在下图中,输入是具有1通道的28×28矩阵.然后是32个5×5过滤器(高度和宽度的跨度为2).因此,我知道结果是14 x 14 x 32.但是,在下一个卷积层中,我们有64个5×5滤波器(同样是步幅2).那么,为什么结果是7×7×64而不是7×7×32 * 64?我们不是将64个过滤器中的每一个应用于32个通道中的每一个吗?

I am trying to understand how the dimensions in convolutional neural network behave. In the figure below the input is 28-by-28 matrix with 1 channel. Then there are 32 5-by-5 filters (with stride 2 in height and width). So I understand that the result is 14-by-14-by-32. But then in the next convolutional layer we have 64 5-by-5 filters (again with stride 2). So why the result is 7-by-7- by 64 and not 7-by-7-by 32*64? Aren't we applying each one of the 64 filters to each one of the 32 channels?

推荐答案

一个过滤器是上一层中所有尺寸的总和.这意味着5x5过滤器可对所有32个维度求和,并且本质上是32 * 5 * 5值的加权总和.但是,权重值在各个尺寸之间共享.然后有64个这样的过滤器.可以在此处找到有关图像的更好解释: http://cs231n.github.io/convolutional-networks /.

One filter is the sum of all the dimensions in the previous layer. This means that the 5x5 filter sums up over all 32 dimensions and in essence is a weighted sum of 32*5*5 values. However the weight values are shared across dimensions. Then there are 64 such filters. A better explanation with images can be found here: http://cs231n.github.io/convolutional-networks/.

这篇关于卷积神经网络中的维数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-12 02:44