Add a dropout layer to a narxnet

3 ビュー (過去 30 日間)
Elieser Ernesto
Elieser Ernesto 2024 年 1 月 23 日
コメント済み: Elieser Ernesto 2024 年 1 月 23 日
Hello everyone
Once I create a narxnet (for example thisone with three layers and 10 neurons eachone: net = narxnet(1:2,1:2, [10 10 10],'open', 'trainlm'))
How can I add a dropout layer to it?
Thanks in advance.

回答 (1 件)

Rishi
Rishi 2024 年 1 月 23 日
Hi Elieser,
I understand from your query that you want to know how to add a dropout layer to 'narnet' neural network.
The 'narxnet' function does not provide an option to add dropout layer directly. However, you can add the dropout by defining a custom transfer function to one of the layers. Details on how to create a custom transfer function is addressed in the following MATLAB Answer:
Hope this helps!
  1 件のコメント
Elieser Ernesto
Elieser Ernesto 2024 年 1 月 23 日
Thank you for your answer Rishi
Could you explain a little bit how the transfer function works?
On one hand I have the narxnet, on the other the new layer: What does the function transfer? Is it the new layer the variable 'mytf'? How does it knows what network am I refering to?
function add_trfcn(fname)
open_system('neural');
open_system('neural/Transfer Functions');
set_param('neural','Lock','off')
add_block('simulink/User-Defined Functions/Interpreted MATLAB Function',['neural/Transfer' char(13) 'Functions/',fname], 'matlabfcn',fname,'name',fname)
Thanks in advance

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by