instanceNorm.
Normalize across each channel for each observation independently
Syntax
描述
The instance normalization operation normalizes the input data across each channel for each observation independently. To improve the convergence of training the convolutional neural network and reduce the sensitivity to network hyperparameters, use instance normalization between convolution and nonlinear operations such asrelu
。
After normalization, the operation shifts the input by a learnable offsetβ并通过学习的比例因子来缩放它γ.。
TheinstanceNorm.
function applies the layer normalization operation todlarray.
data.Usingdlarray.
对象通过允许您标记尺寸来更轻松地使用高维数据。例如,您可以使用使用的标记对应于空间,时间,通道和批量尺寸的维度标记“S”
,“t”
,“C”
, 和“b”
labels, respectively. For unspecified and other dimensions, use the"U"
标签。为了dlarray.
object functions that operate over particular dimensions, you can specify the dimension labels by formatting thedlarray.
object directly, or by using theDataFormat
选项。
Note
To apply instance normalization within a分层图
对象或者层
array, useinstanceNormalizationLayer
。
将实例归一化操作应用于输入数据Y
= instancenorm(X
,抵消
,scaleFactor
)X
and transforms using the specified offset and scale factor.
The function normalizes over grouped subsets of the'S'
(spatial),'T'
(时间和'U'
(未指定的)尺寸X
for each observation in the'C'
(channel) and'B'
(批量)尺寸独立。
为了unformatted input data, use the'dataformat'
选项。
applies the instance normalization operation to the unformattedY
= instancenorm(X
,抵消
,scaleFactor
,'dataformat',fmt)dlarray.
objectX
with format specified byFMT
使用任何先前的语法。输出Y
是一个不形式的dlarray.
具有尺寸的对象与相同的顺序X
。为了example,'dataformat','sscb'
specifies data for 2-D image input with format'SSCB'
(spatial, spatial, channel, batch).
例子
Input Arguments
Output Arguments
算法
The instance normalization operation normalizes the elementsxi首先计算平均值的输入μ.I和方差σ.I2over the spatial and time dimensions for each channel in each observation independently. Then, it calculates the normalized activations as
whereε.is a constant that improves numerical stability when the variance is very small.
To allow for the possibility that inputs with zero mean and unit variance are not optimal for the operations that follow instance normalization, the instance normalization operation further shifts and scales the activations using the transformation
where the offsetβ和规模因子γ.are learnable parameters that are updated during network training.
Extended Capabilities
Version History
See Also
relu
|fullyconnect
|DLCONV.
|dlarray.
|dlgradient.
|dlfeval
|batchnorm
|layernorm
|Groupnorm.