machine-learning - 卷积神经网络的特征图和参数总数
问题描述
假设我有一个尺寸为 125 * 125 的RGB图像,并且我使用了 10 个尺寸为 5 * 5 且步幅 = 3 的过滤器,那么这一层的特征图是什么?我猜测特征图的参数总数是多少
:10*((125-5)/3)+1 = (41 * 41 * 10)(no of filters) 但是 RGB 图像或灰度图像有什么区别图像,所以对于 RGB 图像,它应该是 41 * 41 * 30 (过滤器数量 * 输入图像的通道数量)?对于参数总数:5 * 5 * 3 * 10=750 ?
解决方案
注意:关于 CNN 如何在 Data Science Stack Exchange 上工作的直觉,我有一篇广受欢迎的文章。也请检查一下。
您对特征图的形状是正确的,具有给定的步幅。
CNN 中的参数总数由下式给出 -
Params = (n*m*l+1)*k
where, l = number of input feature maps / image channels,
k = number of output feature maps / # of filters,
n*m = filter dimensions
Important! - The +1 in the formula is because each of the output feature
maps have a bias term added, which is also a trainable parameter. So, don't
forget to add that!
因此,对于您的情况,可训练参数的数量:((5*5*3+1)*10) = 760
而且,对于灰度,它是:((5*5*1+1)*10) = 260
我发现一个非常好的可视化可以直观地显示过滤器如何创建特征图。
如果它是第input feature maps
一个 CNN 层,则与输入图像的通道数相同。由于 CNN 通常是堆叠的,因此将先前 CNN 的输出通道调用input feature maps
到当前 CNN 层。
推荐阅读
- javascript - Redux - npm 运行开发
- extjs - 如何仅在单击复选框而不是使用复选框选择模型的任何单元格上选择记录
- python - Revit Python 的 isinstance() 有问题
- postgresql - 使用orange3的模棱两可的列错误 - POSTGRES
- vb.net - 获取 MouseDown 和 DragDrop 的控件名称
- python - Python Split() 函数拆分无明显原因
- html - CSS 响应式边框半径图像
- c# - 所需的可执行文件的路径是什么
- metal - 在 Metal 中处理小数据时,何时使用 setVertexBytes/setVertexBuffer?
- r - 了解 R Console 与 Sweave 中函数的反直觉运行时间