2-D grouped convolutional layer
A 2-D grouped convolutional layer separates the input channels into groups and applies sliding convolutional filters. Use grouped convolutional layers for channel-wise separable (also known as depth-wise separable) convolution.
For each group, the layer convolves the input by moving the filters along the input vertically and horizontally and computing the dot product of the weights and the input, and then adding a bias term. The layer combines the convolutions for each group independently. If the number of groups is equal to the number of channels, then this layer performs channel-wise convolution.
creates a 2-D grouped convolutional layer and sets the layer
= groupedConvolution2dLayer(filterSize
,numFiltersPerGroup
,numGroups
)FilterSize
, NumFiltersPerGroup
, and NumGroups
properties.
creates a layer for channel-wise convolution (also known as depth-wise convolution). In
this case, the software determines the layer
= groupedConvolution2dLayer(filterSize
,numFiltersPerGroup
,'channel-wise')NumGroups
property at training time. This syntax is equivalent to setting
NumGroups
to the number of input channels.
sets the optional layer
= groupedConvolution2dLayer(___,Name,Value
)Stride
, DilationFactor
, Parameters and Initialization,
Learn Rate and Regularization, and Name
properties using name-value pairs. To specify input
padding, use the 'Padding'
name-value pair argument. For example,
groupedConvolution2dLayer(5,128,2,'Padding','same')
creates a 2-D
grouped convolutional layer with 2 groups of 128 filters of size [5 5]
and pads the input to so that the output has the same size. You can specify multiple
name-value pairs. Enclose each property name in single quotes.
[1] Glorot, Xavier, and Yoshua Bengio. "Understanding the difficulty of training deep feedforward neural networks." In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pp. 249-256. 2010.
[2] He, Kaiming, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. "Delving deep into rectifiers: Surpassing human-level performance on imagenet classification." In Proceedings of the IEEE international conference on computer vision, pp. 1026-1034. 2015.
batchNormalizationLayer
| convolution2dLayer
| fullyConnectedLayer
| maxPooling2dLayer
| reluLayer
| trainNetwork