How to add a dense layer to a neural network?
26 ビュー (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
採用された回答
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Data Workflows についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!