machine-learning - 关于将卷积层实现为全连接层的困惑

标签 machine-learning neural-network deep-learning conv-neural-network

我有点理解我们如何根据 cs231n 将全连接层转换为卷积层:

FC->CONV conversion. Of these two conversions, the ability to convert an FC layer to a CONV layer is particularly useful in practice. Consider a ConvNet architecture that takes a 224x224x3 image, and then uses a series of CONV layers and POOL layers to reduce the image to an activations volume of size 7x7x512 (in an AlexNet architecture that we’ll see later, this is done by use of 5 pooling layers that downsample the input spatially by a factor of two each time, making the final spatial size 224/2/2/2/2/2 = 7). From there, an AlexNet uses two FC layers of size 4096 and finally the last FC layers with 1000 neurons that compute the class scores. We can convert each of these three FC layers to CONV layers as described above: ...

但是,我正在读 paper使用全卷积回归网络来预测密度图,在其架构描述中,他们声称从 12x12x128 到 12x12x512 的中间层(例如顶行,A 和 B 只是两个不同的模型)是全连接的,但实现为卷积: enter image description here

我不明白的是,在cs231n中,卷积实现的输出应该是一个尺寸如1x1x4096的向量,论文如何将其FC的输出尺寸如12x12x512作为卷积实现?

最佳答案

第二种情况不是FC。对于全连接层的卷积表示,卷积核应具有与输入相同的形状。在 cs231 情况下,输入是 7x7x512 与形状 7x7x512 的内核进行卷积,并且有 4096 这样的内核,因此我们得到 1x1x4096 作为输出。在第二种情况下,它只是普通的卷积:12x12x1283x3x128 内核(带填充)进行卷积,并且有 512 这样的内核给出输出尺寸12x12x512

关于machine-learning - 关于将卷积层实现为全连接层的困惑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44874252/

相关文章:

Python-如何将时间序列存储到数据集中

javascript - 反向传播训练卡住了

python - 这个特征列是什么,它如何影响训练?

machine-learning - 回归模型比较

machine-learning - 如何获得随机森林算法对自变量使用的最终方程来预测因变量?

python - 反向传播时深度学习的问题。 (Python)

machine-learning - 在 CNN 中组合多个内核大小

python - 神经网络的多维输入

neural-network - Keras:使用 VGG16 检测特定的非通用项目?

python - 使用文本特征提取创建数据集