Is it possible to change some properties of only a subset of units (neurons) in a hidden layer?

1 view (last 30 days)
I am wondering if it is possible to change some properties of only a subset of units (neurons) in a hidden layer? Let say you have a network with 1 hidden (with 10 neurons) and 1 output layer:
net=fitnet(10);
Is it possible to change the transfer function of only the first 5 neurons in the first hidden layer to logsig while keeping the rest as tansig?
net.layers{1,1}.transferFcn='logsig';
will change all the units transfer function to logsig.
One possible way to overcome this problem is to define 10 parallel hidden layers (all connected to inputs) with single units. Then change their properties individually. I am just looking if there are any more compact ways of doing this.
Thanks in advance.
  2 Comments
Greg Heath
Greg Heath on 25 Jan 2018
Edited: Greg Heath on 25 Jan 2018
Using purelin in hidden nodes is useless. Better to choose a nonlinear alternative.
Hope this helps.
Greg

Sign in to comment.

Answers (1)

Greg Heath
Greg Heath on 25 Jan 2018
The best way to pursue this is to have multiple hidden layers IN PARALLEL, each connected between the input and output layers but not connected to each other.
Then you can use a different type of hidden node for each of the parallel hidden layers.
Hope tis helps.
Thank you for formally accepting my answer
Greg

Community Treasure Hunt

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

Start Hunting!