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

2 visualizzazioni (ultimi 30 giorni)
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.

Risposte (1)

Udit06
Udit06 il 30 Set 2024
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.

Categorie

Scopri di più su Deep Learning Toolbox in Help Center e File Exchange

Prodotti


Release

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by