---
title: BNNS.LossReduction.weightedMean
framework: accelerate
role: symbol
role_heading: Case
path: accelerate/bnns/lossreduction/weightedmean
---

# BNNS.LossReduction.weightedMean

Sums the loss of all samples in the batch and divides by the sum of all weights.

## Declaration

```swift
case weightedMean
```

## See Also

### Loss Reduction Functions

- [BNNS.LossReduction.none](accelerate/bnns/lossreduction/none.md)
- [BNNS.LossReduction.reductionMean](accelerate/bnns/lossreduction/reductionmean.md)
- [BNNS.LossReduction.sum](accelerate/bnns/lossreduction/sum.md)
- [BNNS.LossReduction.zeroWeightMean](accelerate/bnns/lossreduction/zeroweightmean.md)
