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

3 Ansichten (letzte 30 Tage)
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.

Akzeptierte Antwort

Richard
Richard am 4 Mai 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')]

Weitere Antworten (0)

Kategorien

Mehr zu Install Products finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by