The conv layer in CNN uses different filters for activation maps but if all the weghits are same for all filters the feature maps of all filters will be same so whats the use of having more than one filter ?

2 次查看(过去 30 天)
Suppose if i have a image size of 36 * 36 * 1 and i use a filter of 2*2 and stride 2 and 12 number of filters but what are the weights for the filters like if the first filter has all ones the second should have a different value third should have a different so that we get different activation maps but if all the filters are same we don`t have any distinct features since all are same. So, how do we do that in Matlab like how can we initialise each filter with weights or is this pre configured something like that.

回答(1 个)

Renee Coetsee
Renee Coetsee 2017-4-13
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 totally necessary because this will only be the starting point for the network training.
When you do transfer learning on a pretrained 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:

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by