What is the default transfer function for fitnet?

29 visualizaciones (últimos 30 días)
Kevin Amaral
Kevin Amaral el 6 de Feb. de 2017
Comentada: Tilak Nanavati el 20 de Mayo de 2020
I've been trying to find out what the default network configuration settings for the fitnet function are. It's not clear exactly which of the many transfer functions were used and the documentation of the function is not explicit.
What is MATLAB's default transfer function when I use:
train(fitnet(N), x, y)
Is it sgn? Is it tanh? What is that activation function?

Respuestas (4)

Greg Heath
Greg Heath el 8 de Feb. de 2017
tansig (AKA tanh)
Thank you for formally accepting my answer
Greg
  1 comentario
Kevin Amaral
Kevin Amaral el 15 de Feb. de 2017
Thank you for your response, Greg. Could you tell me where you determined this from? Again, as I said the documentation is not explicit or I may have missed where it has been said.
I'd like to be very sure that I'm not misrepresenting the network structure I'm using as I will be reporting on it to others for the sake of repeatability. Unfortunately, "run this experiment code in MATLAB" will not appropriately qualify.
Sorry for the delay in getting back to you on this.

Iniciar sesión para comentar.


KAE
KAE el 19 de Feb. de 2020
Greg, do you happe to know where in the documentation it says that tansig is the default?
I can only find how to list all the available functions,
help nntransfer
or get info on tansig itself,
doc tansig
but neither states that it is the default, and if you don't already have a network in memory, I am not sure how to look this up, and think there must be a secret stash of documentation that I don't know about.
  1 comentario
Tilak Nanavati
Tilak Nanavati el 20 de Mayo de 2020
I thnk this might help.
Follow these steps:
net = fitnet;
net.layers{1}
Doing this you'll able to see something like this:
The "transferFcn" indicates the transfer function.
Neural Network Layer
name: 'Hidden'
dimensions: 10
distanceFcn: (none)
distanceParam: (none)
distances: []
initFcn: 'initnw'
netInputFcn: 'netsum'
netInputParam: (none)
positions: []
range: [10x2 double]
size: 10
topologyFcn: (none)
transferFcn: 'tansig'
transferParam: (none)
userdata: (your custom info)

Iniciar sesión para comentar.


KSSV
KSSV el 19 de Feb. de 2018
net = fitnet(N) ;
Check net, it will be a class of network. In that type net.Layers{i}, where i = 1,2...if you have only one hidden layer. In that you can fin the activation function and other details.

Greg Heath
Greg Heath el 20 de Feb. de 2018
%If you want to know network details, just remove ending semicolons on a succession of commands
net = fitnet
%Then scrolling down see the layers term?
layers: {2x1 cell array of 2 layers}
% Therefore, continuing command by command
hiddenlayerproperties = net.layers{1}
outputlayerproperties = net.layers{2}
Hope this helps
Thank you for formally accepting my answer
Greg

Categorías

Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by