How to change the activation function in Output Layer?

14 ビュー (過去 30 日間)
Cuthbert Shang Wui Ng
Cuthbert Shang Wui Ng 2021 年 12 月 7 日
回答済み: Krishna 2024 年 2 月 11 日
Hello, does any of you have any idea of how to manually implement the type of activation function for output layer: "OutputLayerActivation" for Regressor Neural Network in Statistical and Machine Learning Toolbox? I attempt to include it in fitrnet(), but it does not work. Thank you.

回答 (1 件)

Krishna
Krishna 2024 年 2 月 11 日
Hello Cuthbert,
From what I gather, you are looking to manually implement an activation function and assign this custom function to "OutputLayerActivation". Unfortunately, when using the fitrnet function, you are limited to predefined activation functions such as 'relu', 'sigmoid', 'none', and 'tanh', as specified in the documentation:
However, you do have the option to utilize dlnetworks, which allows you to create your own layers that can serve as custom activation functions.
For more information on how to define custom layers, please review the following documentation:
Hope this helps.

カテゴリ

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

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by