卷积神经网络 – 如何获取特征图?

我读了一些关于卷积神经网络的书籍和文章,似乎理解了概念,但我不知道如何像下图那样构建它:alt text
(来源: what-when-how.com)

从 28×28 的标准化像素 INPUT,我们得到 4 个大小为 24×24 的特征图。但是如何得到它们呢? 是调整 INPUT 图像的大小?还是执行图像转换? 但是什么样的转换?或者将输入图像切割成 4 个大小为 24×24 的块,分别取四个角? 我不明白这个过程,对我来说,似乎他们在每一步都裁剪或调整图像大小到更小的图像。 请帮忙,谢谢。


回答:

这是 MATLAB 中 CONV2 函数的帮助文件,用于 CNN 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).**

Related Posts

L1-L2正则化的不同系数

我想对网络的权重同时应用L1和L2正则化。然而,我找不…

使用scikit-learn的无监督方法将列表分类成不同组别,有没有办法?

我有一系列实例,每个实例都有一份列表,代表它所遵循的不…

f1_score metric in lightgbm

我想使用自定义指标f1_score来训练一个lgb模型…

通过相关系数矩阵进行特征选择

我在测试不同的算法时,如逻辑回归、高斯朴素贝叶斯、随机…

可以将机器学习库用于流式输入和输出吗?

已关闭。此问题需要更加聚焦。目前不接受回答。 想要改进…

在TensorFlow中,queue.dequeue_up_to()方法的用途是什么?

我对这个方法感到非常困惑,特别是当我发现这个令人费解的…

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注