---
title: "layerNorm(axes:epsilon:)"
framework: accelerate
role: symbol
role_heading: Instance Method
path: "accelerate/bnnsgraph/builder/tensor/layernorm(axes:epsilon:)"
---

# layerNorm(axes:epsilon:)

Adds a layer normalization operation to the current graph.

## Declaration

```swift
func layerNorm(axes: [Int], epsilon: Float = .ulpOfOne.squareRoot()) -> BNNSGraph.Builder.Tensor<T>
```

## Parameters

- `axes`: The axes over which the operation performs normalization.
- `epsilon`: The epsilon value that the function uses to avoid division by zero.
