---
title: groups
framework: metalperformanceshaders
role: symbol
role_heading: Instance Property
path: metalperformanceshaders/mpscnnconvolutiondescriptor/groups
---

# groups

The number of groups that the input and output channels are divided into.

## Declaration

```swift
var groups: Int { get set }
```

## Discussion

Discussion The default value is 1. Groups let you reduce parametrization. If the value of this property is set to n, the input is divided into n groups with inputFeatureChannels``/n channels in each group. Similarly, the output is divided into n groups with outputFeatureChannels/n channels in each group.  The ith group in the input is only connected to the ith group in the output, so the number of weights (parameters) needed is reduced by a factor of n. Both the value of the inputFeatureChannels and outputFeatureChannels properties must be divisible by n and the number of channels in each group must be a multiple of 4.

## See Also

### Instance Properties

- [inputFeatureChannels](metalperformanceshaders/mpscnnconvolutiondescriptor/inputfeaturechannels.md)
- [kernelHeight](metalperformanceshaders/mpscnnconvolutiondescriptor/kernelheight.md)
- [kernelWidth](metalperformanceshaders/mpscnnconvolutiondescriptor/kernelwidth.md)
- [outputFeatureChannels](metalperformanceshaders/mpscnnconvolutiondescriptor/outputfeaturechannels.md)
- [strideInPixelsX](metalperformanceshaders/mpscnnconvolutiondescriptor/strideinpixelsx.md)
- [strideInPixelsY](metalperformanceshaders/mpscnnconvolutiondescriptor/strideinpixelsy.md)
- [neuron](metalperformanceshaders/mpscnnconvolutiondescriptor/neuron.md)
- [dilationRateX](metalperformanceshaders/mpscnnconvolutiondescriptor/dilationratex.md)
- [dilationRateY](metalperformanceshaders/mpscnnconvolutiondescriptor/dilationratey.md)
- [neuronParameterA()](metalperformanceshaders/mpscnnconvolutiondescriptor/neuronparametera().md)
- [neuronParameterB()](metalperformanceshaders/mpscnnconvolutiondescriptor/neuronparameterb().md)
- [neuronType()](metalperformanceshaders/mpscnnconvolutiondescriptor/neurontype().md)
- [fusedNeuronDescriptor](metalperformanceshaders/mpscnnconvolutiondescriptor/fusedneurondescriptor.md)
