MATLAB: Is it necessary to have multiple filters for a convolution layer in a CNN

activationscnnfiltersnetneuralnnweights

I have a convolution layer in my CNN. For example, say the filter size is 2×2 and the stride is 2. There are 12 filters. What are the weights for the filters? How do they learn different features and activations? In order to get each filter to learn different weights, do I need to initialize the weights of each filter to different starting values? 

Best Answer

The "trainNetwork" function in MATLAB will learn different weights for each filter, so that each filter learns different features. Although you can initialize each filter, this is not necessary as this will only be the starting point for the network training.
When you do transfer learning on a pre-trained network such as AlexNet, the initial weights before transfer learning are the weights that AlexNet learned during its training.
If you are training from scratch, you can initialize the weights to be random values. See the "Specify Initial Weight and Biases in Convolutional Layer" example at this link: