---
title: "init(device:doWeightedSumByNonZeroWeights:)"
framework: metalperformanceshaders
role: symbol
role_heading: Initializer
path: "metalperformanceshaders/mpsnnreducefeaturechannelsandweightssum/init(device:doweightedsumbynonzeroweights:)"
---

# init(device:doWeightedSumByNonZeroWeights:)

## Declaration

```swift
init(device: any MTLDevice, doWeightedSumByNonZeroWeights: Bool)
```
