---
title: BNNSLossReductionWeightedMean
framework: accelerate
role: symbol
role_heading: Global Variable
path: accelerate/bnnslossreductionweightedmean
---

# BNNSLossReductionWeightedMean

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

## Declaration

```swift
var BNNSLossReductionWeightedMean: BNNSLossReductionFunction { get }
```

## Discussion

Discussion BNNSLossReductionWeightedMean sums the loss of all samples in the batch and divides by the sum of all weights.

## See Also

### Reduction Functions

- [rawValue](accelerate/bnnslossreductionfunction/rawvalue.md)
- [init(_:)](accelerate/bnnslossreductionfunction/init(_:).md)
- [init(rawValue:)](accelerate/bnnslossreductionfunction/init(rawvalue:).md)
- [BNNSLossReductionMean](accelerate/bnnslossreductionmean.md)
- [BNNSLossReductionNonZeroWeightMean](accelerate/bnnslossreductionnonzeroweightmean.md)
- [BNNSLossReductionSum](accelerate/bnnslossreductionsum.md)
- [BNNSLossReductionNone](accelerate/bnnslossreductionnone.md)
