ReLu 'Activation function' is not a recognized parameter in convolution2dLayer

3 visualizzazioni (ultimi 30 giorni)
convolution2dLayer(32, 7, 'Stride', 2, 'Padding', 'same', 'Name', 'conv_1', 'Activation', 'relu')
This is my line code and resulted error below:
Error using convolution2dLayer>iParseInputArguments (line 155)
'ActivationFcn' is not a recognized parameter. For a list of valid name-value pair arguments, see the documentation for this
function.

Risposta accettata

Richard
Richard il 4 Mag 2023
"Activation" is not a valid input option for convolution2dLayer in MATLAB. In MATLAB, activation functions are specified by connecting the output of the convolution layer to an appropriate activation layer - in this case reluLayer:
convRelu = [...
convolution2dLayer(32, 7, 'Stride', 2, 'Padding', 'same', 'Name', 'conv_1'); ...
reluLayer('Name', 'relu_1')]

Più risposte (0)

Categorie

Scopri di più su Install Products in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by