<blockquote>
  <p>And secondly, why would I use [grouping]?</p>
</blockquote>

<p>This was originally presented as an optimization in the paper which sparked the current cycle of neural network popularity :</p>

<blockquote>
  <p>Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. "<a href="https://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf" rel="noreferrer">Imagenet classification with deep convolutional neural networks</a>." In Advances in neural information processing systems, pp. 1097-1105. 2012.</p>
</blockquote>

<p>Figure 2 shows how grouping was used for that work. The authors of caffe originally added this ability so they could replicate the AlexNet architecture. However grouping continues to show itself as beneficial in other scenarios. </p>

<p>For example both Facebook and Google have released papers which essentially show that grouping can dramatically reduce resource use while helping to preserve accuracy. The Facebook paper can be seen here:(<a href="https://arxiv.org/abs/1611.05431" rel="noreferrer">ResNeXt</a>)  and the Google paper can be found here: (<a href="https://arxiv.org/abs/1704.04861" rel="noreferrer">MobileNets</a>)</p>
caffe: What does the **group** param mean?
<p>I have read the documentation about the <strong>group</strong> param:</p>

<blockquote>
  <p>group (g) [default 1]: If g > 1, we restrict the connectivity of each filter to a subset of the input. Specifically, the input and output channels are separated into g groups, and the ith output group channels will be only connected to the ith input group channels.</p>
</blockquote>

<p>But first of all I do not understand exactly what they mean. And secondly, why would I use it. Could anyone help me to explain it a bit better?</p>

<p>As far as I have understood it, it means following:</p>

<p>If I set g greater than 1 my input and output channels are separated into groups. But how exactly is that done? If I set it to 20 and my input is 40 I will have to groups of 20? And if the output is 50 I will have one group of 20 and one group of 30?</p>