Normalization layers¶
-
class
dynn.layers.normalization_layers.
LayerNorm
(pc, input_dim, gain=None, bias=None)¶ Bases:
dynn.layers.base_layers.ParametrizedLayer
Layer normalization layer:
\(y=\frac{g}{\sigma(x)}\cdot(x-\mu(x)+b)\)
Parameters: - input_dim (int, tuple) – Input dimension
- pc (
dynet.ParameterCollection
) – Parameter collection to hold the parameters
-
__call__
(x, d=None)¶ Layer-normalize the input.
Parameters: x ( dynet.Expression
) – Input expressionReturns: \(y=\frac{g}{\sigma(x)}\cdot(x-\mu(x)+b)\) Return type: dynet.Expression
-
__init__
(pc, input_dim, gain=None, bias=None)¶ Creates a subcollection for this layer with a custom name