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

3 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

Richard
Richard el 4 de Mayo de 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')]

Más respuestas (0)

Categorías

Más información sobre Install Products en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by