def add_layer_normalization(
        self, name, input_name, output_name, normalized_shape, gamma, beta, eps=1e-5
    ):
        """
        Add a layer normalization layer to the model that applies layer
        normalization over the input tensor.
        Refer to the ``LayerNormalizationLayerParams`` message in the specification
        (NeuralNetwork.proto) for more details.

        Parameters
        ----------
        name: str
            The name of this layer.
        input_name: str
            The input blob name of this layer.
        output_name: str
            The output blob name of this layer.
        normalized_shape: list of int or tuple of int
            Input shape from an expected input of size.
        gamma: WeightParams
            Weight parameters.
        beta: WeightParams
            Bias parameters.
        eps: float, optional
            Constant value added to the denominator, default: 1e-5.
        """

        if gamma.shape != tuple(normalized_shape):
            raise ValueError("Shape of parameter gamma should match normalized_shape")

        if beta.shape != tuple(normalized_shape):
            raise ValueError("Shape of parameter beta should match normalized_shape")

        spec_layer = self._add_generic_layer(name, [input_name], [output_name])
        spec_layer_params = spec_layer.layerNormalization

        spec_layer_params.normalizedShape.extend(normalized_shape)

        weights = spec_layer_params.gamma
        weights.floatValue.extend(gamma.flatten())

        bias = spec_layer_params.beta
        bias.floatValue.extend(beta.flatten())

        spec_layer_params.eps = eps

        return spec_layer

        Add a layer normalization layer to the model that applies layer
        normalization over the input tensor.
        Refer to the ``LayerNormalizationLayerParams`` message in the specification
        (NeuralNetwork.proto) for more details.

        Parameters
        ----------
        name: str
            The name of this layer.
        input_name: str
            The input blob name of this layer.
        output_name: str
            The output blob name of this layer.
        normalized_shape: list of int or tuple of int
            Input shape from an expected input of size.
        gamma: WeightParams
            Weight parameters.
        beta: WeightParams
            Bias parameters.
        eps: float, optional
            Constant value added to the denominator, default: 1e-5.
        
coremltools/models/neural_network/builder.py