<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNS/GradientClipping/byGlobalNorm(threshold:globalNorm:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:10Accelerate4BNNSO16GradientClippingO12byGlobalNormyAESf_SftcAEmF"
  },
  "title" : "BNNS.GradientClipping.byGlobalNorm(threshold:globalNorm:)"
}
-->

# BNNS.GradientClipping.byGlobalNorm(threshold:globalNorm:)

A constant that indicates that the operation clips gradients to a specified global Euclidean norm.

```
case byGlobalNorm(threshold: Float, globalNorm: Float = 0)
```

## Parameters

`threshold`

The maximum Euclidean norm.

`globalNorm`

An optional value for a known global Euclidean norm. Set to `0` to specify that the function computes the norm.

---

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)