文档

ImageInputlayer

图像输入层

描述

图像输入层将图像输入到网络并应用数据归一化。

创建

句法

layer = imageInputlayer(Inputsize)
layer = imageInputlayer(inputsize,name,value)

描述

= imageInputlayer(输入返回图像输入层并指定InputSize财产。

例子

= imageInputlayer(输入,,,,名称,价值设置可选propertiesusing name-value pairs. You can specify multiple name-value pairs. Enclose each property name in single quotes.

特性

展开全部

输入的大小data, specified as a row vector of three integer values[H W C], 在哪里H是高度,wis the width, andCis the number of channels. SetC1对于灰度图像,3用于RGB图像或多光谱或高光谱图像中的通道数。如果您设置InputSize使用该功能ImageInputlayer,,,,you can specify输入作为两个值的行矢量[H W]将频道的数量设置为1。

笔记

如果Cis greater than1,然后将输入数据视为二维数据平面的堆栈,而不是3维体积。每个平面都是独立处理的。

例子:[128 128 3]

笔记

数据调整不建议使用财产。为了进行裁剪,反射和其他几何变换的预处理图像,请使用增生模构达塔斯塔尔反而。

数据增强转换在培训期间使用,并指定为以下一项。

  • '没有任何'- 没有数据扩展

  • 'randcrop'-Take a random crop from the training image. The random crop has the same size as the input size.

  • 'randfliplr'-Randomly flip the input images horizontally with a 50% chance.

  • 细胞阵列'randcrop'and'randfliplr'。该软件按照单元格数组中指定的顺序应用增强。

图像数据的增强是减少过度拟合的另一种方式[1],,,,[2]

数据类型:char|细胞

数据转换以应用于每次数据通过输入层转发传播时,指定为以下一个。

  • “零中心”- 该层减去训练集的平均图像。

  • '没有任何'- 没有转变。

数据类型:char

图层名称,指定为字符向量。如果姓名is set to'',然后该软件在培训时间自动分配名称。

数据类型:char

例子

全部收缩

为28 x-28颜色图像创建图像输入层'输入'。默认情况下,该层通过从每个输入图像中减去训练集的平均图像来执行数据归一化。

inputlayer = imageInputlayer([28 28 3],,'姓名',,,,'输入'
inputlayer =带有属性的ImageInputlayer:name:'Input'inputsize:[28 28 3]超参数dataigmentation:'none'标准化:'zerecenter'

在一个中包含图像输入层大批。

层= [...imageInputlayer([28 28 1])卷积2Dlayer(5,20)Relulayer MaxPooling2Dlayer(2,“大步”,2)完整连接的layerer(10)SoftMaxlayer分类器]
层s = 7x1 Layer array with layers: 1 '' Image Input 28x28x1 images with 'zerocenter' normalization 2 '' Convolution 20 5x5 convolutions with stride [1 1] and padding [0 0 0 0] 3 '' ReLU ReLU 4 '' Max Pooling 2x2 max pooling with stride [2 2] and padding [0 0 0 0] 5 '' Fully Connected 10 fully connected layer 6 '' Softmax softmax 7 '' Classification Output crossentropyex

References

[1] Krizhevsky, A., I. Sutskever, and G. E. Hinton. "ImageNet Classification with Deep Convolutional Neural Networks". Advances in Neural Information Processing Systems. Vol 25, 2012.

[2]Cireşan,D.,U。Meier,J。Schmidhuber。“用于图像分类的多列深神经网络”。IEEE计算机视觉和模式识别会议,2012年。

在R2016a中引入

Was this topic helpful?