Creating a neural network with hidden layer that has more than one activation function.

8 次查看(过去 30 天)
Hello.
I'm trying to create a simple neural network to fit the data that I have. it's a simple forward network with one hidden layer and one output layer. I would like to make the hidden layer in a way that it has a linear part and a non-linear part. The activation function of linear part is 'purelin' and activation function of non-linear part is 'tansig'. For example half of neurans use 'purelin' and the other half use 'tansig'.
Is it even possible to do this without programming the network?
This is an example from "Due Truong Pham and Liu Xing, Neural Networks for Identification,Prediction and Control" and I'm trying to recreate the result using MATLAB.

回答(1 个)

Udit06
Udit06 2024-9-30
Hi,
As per my knowledge, this is not possible without programming the network.
Deep Learning Toolbox of MATLAB allows to customize the network by defining the custom layers for any deep learning model. You can refer to the following MathWorks documentation to understand more about the same:
In the template present in the above link, you can modify the "predict" and "forward" function to create a hidden layer with more than one activation function.

类别

Help CenterFile Exchange 中查找有关 Deep Learning Toolbox 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by