Neural Network Activation function
151 views (last 30 days)
Show older comments
I have 3 input hidden layer and 1 output layer.
I want to set the activation function for input layer as purelin
and output layer as tansig/purelin in 2 different models.
How can I set the above conditions?
0 Comments
Accepted Answer
Chunru
on 5 Jul 2022
net = feedforwardnet([10 20]); % 2 hidden, 1 output layers
% specify the transfer function as you want
% Usually, layer1 will not be pureli
net.layers{1}.transferFcn = 'tansig'; % hidden layer 1
net.layers{2}.transferFcn = 'tansig'; % hidden layer 2
net.layers{3}.transferFcn = 'purelin'; % output layer
net
0 Comments
More Answers (0)
See Also
Categories
Find more on Define Shallow Neural Network Architectures in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!