Image3Dinputlayer
3-D图像输入层
Description
A 3-D image input layer inputs 3-D images or volumes to a network and applies data normalization.
For 2-D image input, useImageInputlayer
。
创建
Description
返回3-D图像输入层,并指定layer
= image3dInputLayer(inputSize
)InputSize
财产。
sets the optional properties using name-value pairs. You can specify multiple name-value pairs. Enclose each property name in single quotes.layer
= image3dInputLayer(inputSize
,,,,名称,价值
)
特性
3-D Image Input
InputSize
-输入的大小
整数矢量
输入数据的大小,指定为整数的行矢量[H W D C]
,在那里H
,,,,w
,,,,d
,,,,andC
对应的高度、宽度,,,,depth, and number of channels respectively.
对于灰度输入,请指定一个带有的向量
C
等于1
。对于RGB输入,请指定一个用
C
等于3
。对于多光谱或高光谱输入,请指定一个向量
C
等于the number of channels.
For 2-D image input, useImageInputlayer
。
Example:[132 132 116 3]
Normalization
-数据归一化
“零中心”
(默认)|'zscore'
|“恢复对称”
|“ recale-Zero-One”
|'没有任何'
|功能句柄
数据归一化以应用于每次数据通过输入层转发传播时,指定为以下一个:
小费
默认情况下,该软件会在培训时间自动计算标准化统计信息。为了节省培训的时间,请指定规范化所需的统计信息,并设置'ResetInputNormalization'
option intrainingOptions
至错误的
。
标准化限制
-Normalization dimension
'汽车'
(默认)|'channel'
|'元素'
|'all'
标准化维度,指定为以下一个:
'汽车'
- 如果培训选项是错误的
您可以指定任何标准化统计数据(Mean
,,,,StandardDeviation
,,,,最小
, 或者Max
),,,,then normalize over the dimensions matching the statistics. Otherwise, recalculate the statistics at training time and apply channel-wise normalization.'channel'
– Channel-wise normalization.'元素'
- 元素归一化。'all'
– Normalize all values using scalar statistics.
数据类型:CHar
|细绳
Mean
-Mean for zero-center and z-score normalization
[]
(默认)|4-D array|numeric scalar
Mean for zero-center and z-score normalization, specified as aH-by-w-by-d-by-Carray, a 1-by-1-by-1-by-Carray of means per channel, a numeric scalar, or[]
,在那里H,,,,w,,,,d,,,,andC分别对应于平均值的高度,宽度,深度和通道数。
如果you specify theMean
property, thenNormalization
must be“零中心”
or'zscore'
。如果Mean
is[]
,然后该软件在训练时计算平均值。
您可以在未经培训的情况下创建网络时设置此属性(例如,使用assembleNetwork
)。
数据类型:单身的
|double
|int8
|int16
|int32
|INT64
|UINT8
|uint16
|UINT32
|Uint64
StandardDeviation
-Standard deviation for z-score normalization
[]
(默认)|4-D array|numeric scalar
Standard deviation for z-score normalization, specified as aH-by-w-by-d-by-Carray, a 1-by-1-by-1-by-Carray of means per channel, a numeric scalar, or[]
,在那里H,,,,w,,,,d,,,,andC分别对应于标准偏差的高度,宽度,深度和通道数。
如果you specify theStandardDeviation
property, thenNormalization
must be'zscore'
。如果StandardDeviation
is[]
,然后该软件在训练时间计算标准偏差。
您可以在未经培训的情况下创建网络时设置此属性(例如,使用assembleNetwork
)。
数据类型:单身的
|double
|int8
|int16
|int32
|INT64
|UINT8
|uint16
|UINT32
|Uint64
最小
-最小imum value for rescaling
[]
(默认)|4-D array|numeric scalar
最小imum value for rescaling, specified as aH-by-w-by-d-by-Carray, a 1-by-1-by-1-by-C每个通道,数字标量或[]
,在那里H,,,,w,,,,d,,,,andC分别对应于最小值的高度,宽度,深度和通道数。
如果you specify the最小
property, thenNormalization
must be“恢复对称”
or“ recale-Zero-One”
。如果最小
is[]
,,,,then the software calculates the minimum at training time.
您可以在未经培训的情况下创建网络时设置此属性(例如,使用assembleNetwork
)。
数据类型:单身的
|double
|int8
|int16
|int32
|INT64
|UINT8
|uint16
|UINT32
|Uint64
Max
-Maximum value for rescaling
[]
(默认)|4-D array|numeric scalar
Maximum value for rescaling, specified as aH-by-w-by-d-by-Carray, a 1-by-1-by-1-by-C每个通道,数字标量或[]
,在那里H,,,,w,,,,d,,,,andC对应的高度、宽度,,,,depth, and the number of channels of the maxima, respectively.
如果you specify the最小
property, thenNormalization
must be“恢复对称”
or“ recale-Zero-One”
。如果Max
is[]
,然后该软件在训练时计算最大值。
您可以在未经培训的情况下创建网络时设置此属性(例如,使用assembleNetwork
)。
数据类型:单身的
|double
|int8
|int16
|int32
|INT64
|UINT8
|uint16
|UINT32
|Uint64
Layer
姓名
-图层名称
''
(默认)|角色向量|字符串标量
图层名称,,,,specified as a character vector or a string scalar. ForLayer
数组输入,火车网
,,,,assembleNetwork
,,,,layerGraph
,,,,anddlnetwork
functions automatically assign names to layers with name''
。
数据类型:CHar
|细绳
NumInputs
-Number of inputs
0(default)
Number of inputs of the layer. The layer has no inputs.
数据类型:double
InputNames
-输入名称
{}
(default)
输入名称of the layer. The layer has no inputs.
数据类型:Cell
numOutputs
-输出数量
1
(default)
This property is read-only.
输出数量of the layer. This layer has a single output only.
数据类型:double
OutputNames
-Output names
{'出去'}
(default)
This property is read-only.
Output names of the layer. This layer has a single output only.
数据类型:Cell
Examples
Create 3-D Image Input Layer
为132-132-116颜色3-D图像创建一个3-D图像输入层'输入'
。默认情况下,该层通过从每个输入图像中减去训练集的平均图像来执行数据归一化。
layer = image3dInputLayer([132 132 116],'姓名',,,,'输入')
layer = Image3DInputLayer with properties: Name: 'input' InputSize: [132 132 116 1] Hyperparameters Normalization: 'zerocenter' NormalizationDimension: 'auto' Mean: []
Include a 3-D image input layer in aLayer
大批。
layers = [ image3dInputLayer([28 28 28 3]) convolution3dLayer(5,16,“大步”,4)Relulayer MaxPooling3Dlayer(2,“大步”,4)完整连接的layerer(10)SoftMaxlayer分类器]
layers = 7x1 Layer array with layers: 1 '' 3-D Image Input 28x28x28x3 images with 'zerocenter' normalization 2 '' Convolution 16 5x5x5 convolutions with stride [4 4 4] and padding [0 0 0; 0 0 0] 3 '' ReLU ReLU 4 '' 3-D Max Pooling 2x2x2 max pooling with stride [4 4 4] and padding [0 0 0; 0 0 0] 5 '' Fully Connected 10 fully connected layer 6 '' Softmax softmax 7 '' Classification Output crossentropyex
版本历史记录
在R2019a中引入R2019b:AverageImage
property will be removed
不建议从R2019b开始
AverageImage
将被删除。利用Mean
反而。要更新您的代码,请替换所有实例AverageImage
和Mean
。属性之间没有差异,需要对您的代码进行其他更新。
R2019b:ImageInputlayer
andImage3Dinputlayer
,,,,by default, use channel-wise normalization
Behavior change in future release
Starting in R2019b,ImageInputlayer
andImage3Dinputlayer
,默认情况下,使用频道归一化。在以前的版本中,这些层使用元素标准化。要复制这种行为,请设置标准化限制
这些层的选项'元素'
。
MATLABCommand
您单击了与此MATLAB命令相对应的链接:
通过在MATLAB命令窗口中输入该命令。Web浏览器不支持MATLAB命令。金宝app
Select a Web Site
选择一个网站以获取可用的翻译内容,并查看本地事件和优惠。根据您的位置,我们建议您选择:。
you can also select a web site from the following list:
如何获得最佳网站性能
选择中国网站(中文或英语)以获得最佳场地性能。其他Mathworks乡村网站未针对您所在的访问进行优化。
Americas
- América Latina(Español)
- Canada(English)
- United States(English)