卷积神经网络-如何获取特征图? [英] Convolutional neural network - How to get the feature maps?

查看:495
本文介绍了卷积神经网络-如何获取特征图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读了几本有关卷积神经网络的书和文章,似乎我理解了这个概念,但是我不知道如何像下面的图片一样提出它:
(来源:何时如何. com )

从28x28归一化像素INPUT中,我们得到4个尺寸为24x24的特征图.但是如何获得它们呢?调整输入图像的大小?或执行图像转换?但是什么样的转变呢?或将输入图像切成4个尺寸为24x24的4个角?我不了解该过程,对我来说似乎他们在每一步都将图像切开或调整为较小的图像大小.请帮助谢谢.

解决方案

这是CONV2函数的matlab帮助文件,该文件在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).**

I read a few books and articles about Convolutional neural network, it seems I understand the concept but I don't know how to put it up like in image below:
(source: what-when-how.com)

from 28x28 normalized pixel INPUT we get 4 feature maps of size 24x24. but how to get them ? resizing the INPUT image ? or performing image transformations? but what kind of transformations? or cutting the input image into 4 pieces of size 24x24 by 4 corner? I don't understand the process, to me it seem they cut up or resize the image to smaller images at each step. please help thanks.

解决方案

This is matlab help file for CONV2 function, which use in CNN Matlab (to get convolutional layers). Read it carefully and you will see your answer.

%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).**

这篇关于卷积神经网络-如何获取特征图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆