---
title: "BNNS.GradientClipping.byGlobalNorm(threshold:globalNorm:)"
framework: accelerate
role: symbol
role_heading: Case
path: "accelerate/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.

## Declaration

```swift
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.

## See Also

### Gradient Clipping Functions

- [BNNS.GradientClipping.none](accelerate/bnns/gradientclipping/none.md)
- [BNNS.GradientClipping.byValue(bounds:)](accelerate/bnns/gradientclipping/byvalue(bounds:).md)
- [BNNS.GradientClipping.byNorm(threshold:)](accelerate/bnns/gradientclipping/bynorm(threshold:).md)
