Instance Property


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


var groups: Int { get set }


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.