필터 지우기
필터 지우기

How to add a dense layer to a neural network?

조회 수: 34 (최근 30일)
LinkTo
LinkTo 2022년 9월 2일
답변: Sivylla Paraskevopoulou 2022년 9월 6일
Hello,
I am trying to build a neural network but I can't figure out how to add a dense layer in MATLAB.
The python equivalent of the code that I want to implement in MATLAB is the following:
model.add(Dense(20, activation='relu',
activity_regularizer=tf.keras.regularizers.l1(0.00001)))
Any help is appreciated. Thanks.

채택된 답변

Sivylla Paraskevopoulou
Sivylla Paraskevopoulou 2022년 9월 6일
I think you want to use a fullyConnectedLayer. You can set the properties of the fullyconnectedLayer object. I also think you will find useful the examples in the fullyConnectedLayer documentation page and this example: Create Simple Image Classification Network.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by