change patternnet transfer function
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
how can i change the transfer function for patternnet? initially i used net.transferFcn = 'tansig'. but it hits error 'reference to non existence field transferFcn'
i have used the nn out of the box tool to generate the nn command. and i have noticed there are some functions i'm not understand n no luck to get answer after asking from google. TrainMask{1}, valMask{2} and testMask{1}.. thanks
0 Commenti
Risposta accettata
Greg Heath
il 14 Giu 2013
'tansig' is the correct default transfer function for both hidden and output layers in patternnet because the default normalization for input and output are mapminmax. It is still correct if you override with mapstd.
However, if you remove the output normalization and the target matrix contains unit vector columns with a single 1, then logsig and softmax are appropriate for estimating input-conditional class posterior probabilities. Both yield consistent estimates. However, the softmax probabilities estimates always sum to 1. If you are using logsig and the unit sum property is desirable, you can always divide the logsig estimates by their sum.
If you are still having problems, post your code.
Trainmask is a vector with ones at the training set indices and zeros otherwise. Multiplication using .* singles out training set inputs and outputs. Similarly for the other masks.
Search ANSWERS and NEWSGROUP for sample code.
Hope this helps.
Thank you for formally accepting my answer.
Greg
0 Commenti
Più risposte (1)
Ahmed
il 3 Giu 2013
try following to change the transfer function in the first hidden layer:
net.layers{1}.transferFcn = 'tansig';
0 Commenti
Vedere anche
Categorie
Scopri di più su Define Shallow Neural Network Architectures in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!