MATLAB: Can we change the name of an input neuron in neural netwrok

MATLABneural network

I want to change the name of all input neuron when designing a neural network

Best Answer

The quick answer is: YES
To understand how, consider the following:
Terminology correction:
The typical FFMLP has
1. 3 layers of nodes (input/hidden/output)
2. 2 layers of weights (input-to-hidden/hidden-to-output)
3. 2 layers of transfer functions AKA neurons (input-to-hidden/hidden-to-output)
4. It is called a two-layer ANN because of the two (hidden and output) neuron layers.
5. The input nodes are known as fan-in units and are not considered to be neurons.
So, there is no such thing as an input neuron!
I infer that you wish to change THE TYPE OF HIDDEN LAYER NEURONS!
If you enter
net = fitnet %No ending semicolon
you will obtain a list of network properties. Concentrate on the contents of the first 3 subobjects
net.inputs
net.layers
net.outputs
%ans = [1x1 nnetInput]
%ans = [1x1 nnetLayer]
% [1x1 nnetLayer]
%ans = [ [] [1x1 nnetOutput]
Then, to extract components
ans1 = net.inputs{1}
ans2 = net.layers{1}
ans3 = net.layers{2}
ans4 = net.outputs{2}
Finally,
layer1tranferFcn = net.layers{1}.transferFcn
layer2transferFcn = net.layers{2}.transferFcn
%layer1tranferFcn = tansig
%layer2transferFcn = purelin
The RHS of the 3rd and 4th equations from the end can be inverted to assign new types of neurons to either or both layers.
Hope this helps.
Thank you for formally accepting my answer
Greg