<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSGraph/Builder/Tensor/rmsNorm(scale:epsilon:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:10Accelerate9BNNSGraphO7BuilderV6TensorV7rmsNorm5scale7epsilonAGy__xGqd___Sft7ElementQyd__RszAE18OperationParameterRd__lF"
  },
  "title" : "rmsNorm(scale:epsilon:)"
}
-->

# rmsNorm(scale:epsilon:)

Adds an RMS spatial normalization operation to the current graph.

```
func rmsNorm(scale: some BNNSGraph.Builder.OperationParameter<T>, epsilon: Float = .ulpOfOne.squareRoot()) -> BNNSGraph.Builder.Tensor<T>
```

## Parameters

`scale`

The scale.

`epsilon`

The epsilon value that the function uses to avoid division by zero.

## Discussion

This function performs `y = x / sqrt(sum_square(x) / size(x) + epsilon) * scale`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)