卷积神经网络 - 如何获得特征图?

16

我读了几本有关卷积神经网络的书和文章,似乎理解了概念,但不知道如何像下面的图片一样实现:

alt text
(来源:what-when-how.com)

从28x28的归一化像素输入中,我们得到4个大小为24x24的特征图。但是如何得到它们呢?调整输入图像的尺寸?或者进行图像变换?但是什么样的变换呢?或者把输入图像切成4个24x24大小的小块,分别位于4个角落?我不理解这个过程,对我来说似乎是在每个步骤中将图像切割或调整大小变成更小的图像。请帮忙解答,谢谢。


你能列举一下你阅读过的卷积神经网络相关的书籍/文章吗?先谢谢了。 - lmsasu
3
好的,我会尽力进行翻译。以下是需要翻译的内容:It is from Neural Networks and Learning Machines, Third Edition book. - Nhu Phuong
10
我也感到困惑,这个卷积实际上是非常重要的部分(因此被称为“卷积神经网络”),但大多数人似乎只关注解释CNN如何工作,而忽略了“如何获得特征图”的部分。在我找到这个网站之前,我感到困惑(并且也感到生气):http://www1.i2r.a-star.edu.sg/~irkhan/conn2.html ,它用通俗易懂的语言解释了一切。 - Max
3
不幸的是,http://www1.i2r.a-star.edu.sg/~irkhan/conn2.html 已经出现了404错误。有没有缓存的版本? - Nate Murray
1
镜像 http://ishtiaqrasool.blogspot.com/2013/07/CoNN2.html(很遗憾没有图片) - ArturPhilibin
很不幸,上面的链接已经失效了,请您修复一下 :) - Ali
1个回答

8

这是用于CNN Matlab(卷积神经网络)中获取卷积层的CONV2函数的Matlab帮助文件。仔细阅读,您将找到答案。

%CONV2 Two dimensional convolution.
%   C = CONV2(A, B) performs the 2-D convolution of matrices A and B.
%   If [ma,na] = size(A), [mb,nb] = size(B), and [mc,nc] = size(C), then
%   mc = max([ma+mb-1,ma,mb]) and nc = max([na+nb-1,na,nb]).
%
%   C = CONV2(H1, H2, A) convolves A first with the vector H1 along the
%   rows and then with the vector H2 along the columns. If n1 = length(H1)
%   and n2 = length(H2), then mc = max([ma+n1-1,ma,n1]) and 
%   nc = max([na+n2-1,na,n2]).
%
%   C = CONV2(..., SHAPE) returns a subsection of the 2-D
%   convolution with size specified by SHAPE:
%     'full'  - (default) returns the full 2-D convolution,
%     'same'  - returns the central part of the convolution
%               that is the same size as A.
%     'valid' - returns only those parts of the convolution
%               that are computed without the zero-padded edges.
%               **size(C) = max([ma-max(0,mb-1),na-max(0,nb-1)],0).**

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接