Dropout Layer Before Fully connected Layer

7 visualizaciones (últimos 30 días)
Abdussalam Elhanashi
Abdussalam Elhanashi el 17 de En. de 2020
Comentada: Abdussalam Elhanashi el 26 de En. de 2020
Hi guys
I am asking if it is possible to make dropout layer before FC layer
Example below:-
layers = [
imageInputLayer([64 64 3],"Name","imageinput","Normalization","none")
convolution2dLayer([5 5],4,"Name","conv_1","Padding","same")
reluLayer("Name","relu_1")
maxPooling2dLayer([2 2],"Name","maxpool_1","Padding","same","Stride",[2 2])
convolution2dLayer([3 3],8,"Name","conv_2","Padding","same")
reluLayer("Name","relu_2")
maxPooling2dLayer([2 2],"Name","maxpool_2","Padding","same","Stride",[2 2])
convolution2dLayer([3 3],32,"Name","conv_3","Padding","same")
reluLayer("Name","relu_3")
averagePooling2dLayer([2 2],"Name","avgpool2d_1","Padding","same","Stride",[2 2])
convolution2dLayer([3 3],64,"Name","conv_4","Padding","same")
reluLayer("Name","relu_4")
averagePooling2dLayer([2 2],"Name","avgpool2d_2","Padding","same","Stride",[2 2])
dropoutLayer(0.51,'Name','drop1')
fullyConnectedLayer(2,"Name","fc")
softmaxLayer("Name","softmax")
classificationLayer("Name","classoutput")];
Best,

Respuesta aceptada

Shashank Gupta
Shashank Gupta el 20 de En. de 2020
Hi Abdussalam,
Yes, you can use Dropout layer before the fully connected layer, Dropout is just a regularization technique for preventing overfitting in the network, it can be applied anywhere regardless of FC or Conv but again it is generally recommended to use it after FC layer because they are the ones with the greater number of parameter and thus they are likely to excessively co-adapting themselves causing Overfitting.
However, it’s a stochastic regularization technique, you can really place it everywhere. Usually placed on the layer with a greater number of parameters, but no denies you from applying anywhere.
  1 comentario
Abdussalam Elhanashi
Abdussalam Elhanashi el 26 de En. de 2020
Hi Shashank Gupta
Thank For your reply
Is it possibe to use Dropout with value 0.6?
Best,

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Financial Data Analytics en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by