In neural network, how can I change the sigmoid activation function to a Gaussian one, How to modify the Matlab codes to achieve this?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Jay Wong
am 4 Jun. 2015
Kommentiert: Jet Yu
am 12 Apr. 2019
that is, change this function: a = tansig(n) = 2/(1+exp(-2*n))-1 to a = gauss(n) = exp(-(n.^2))
0 Kommentare
Akzeptierte Antwort
Greg Heath
am 6 Jun. 2015
net = fitnet;
net.layers{1}.transferFcn = 'radbas';
Hope this helps.
Thank you for formally accepting my answer
Greg
3 Kommentare
Jet Yu
am 12 Apr. 2019
looks type in
net.layers{1}.transferFcn = 'radbas';
would NOT work in R2018a version for bug below
Error using network/subsasgn>network_subsasgn (line 166)
Attempt to assign cell array as a double array.
Error in network/subsasgn (line 14)
net = network_subsasgn(net,subscripts,v,netname);
Even i change as to fix the data type
net.layers(1).transferFcn(1,:) = cellstr('radbas')
error still
Error using network/subsasgn>network_subsasgn (line 166)
Attempt to assign cell array as a double array.
Error in network/subsasgn (line 14)
net = network_subsasgn(net,subscripts,v,netname);
Any way to fix it?
Best
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Define Shallow Neural Network Architectures finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!