Applies Layer Normalization for last certain number of dimensions.
nn_module
Calls torch::nn_layer_norm() when trained. The parameter normalized_shape is inferred as the dimensions of the last dims dimensions of the input shape.
Parameters
dims :: integer(1)
The number of dimensions over which will be normalized (starting from the last dimension).
elementwise_affine :: logical(1)
Whether to learn affine-linear parameters initialized to 1 for weights and to 0 for biases. The default is TRUE.
eps :: numeric(1)
A value added to the denominator for numerical stability.
State
The state is the value calculated by the public method $shapes_out().
Input and Output Channels
One input channel called "input" and one output channel called "output". For an explanation see PipeOpTorch.
Examples
# Construct the PipeOppipeop = po("nn_layer_norm", dims =1)pipeop
# The available parameterspipeop$param_set