<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShadersGraph",
  "identifier" : "/documentation/MetalPerformanceShadersGraph/MPSGraph/normalizationBetaGradient(withIncomingGradientTensor:sourceTensor:reductionAxes:name:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal Performance Shaders Graph",
      "MetalPerformanceShadersGraph"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSGraph(im)normalizationBetaGradientWithIncomingGradientTensor:sourceTensor:reductionAxes:name:"
  },
  "title" : "normalizationBetaGradient(withIncomingGradientTensor:sourceTensor:reductionAxes:name:)"
}
-->

# normalizationBetaGradient(withIncomingGradientTensor:sourceTensor:reductionAxes:name:)

Creates a normalization beta-gradient operation and returns the result tensor.

```
func normalizationBetaGradient(withIncomingGradientTensor incomingGradientTensor: MPSGraphTensor, sourceTensor: MPSGraphTensor, reductionAxes axes: [NSNumber], name: String?) -> MPSGraphTensor
```

## Parameters

`incomingGradientTensor`

The incoming original `resultTensor` gradient.

`sourceTensor`

The original input source in forward direction.

`axes`

The axes of normalization.

`name`

An optional name for the operation.

## Return Value

A valid `MPSGraphTensor` object.

## Discussion

The mean and variance tensors should be outputs of `meanWithTensor:axes:name` and `varianceWithTensor:meanTensor:axes:name`.
Use the axes parameter to achieve different types of normalizations.
For example (assuming your data is in `NxHxWxC` format)
Batch normalization: axes = [0, 1, 2]
Instance normalization: axes = [1, 2]

---

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)