setActivationFunction (cv.ANN_MLP) - MATLAB File Help |
Initialize the activation function for each neuron
model.setActivationFunction(ftype)
model.setActivationFunction(ftype, 'OptionName', optionValue, ...)
f(x) = x
f(x) = beta * (1-exp(-alpha*x))/(1+exp(-alpha*x))
. See
note below.f(x) = beta * exp(-alpha^2*x*x)
f(x) = max(0,x)
f(x) = x, for x>0
and
f(x) = alpha*x, for x<=0
alpha
. default 0beta
. default 0Currently the default and the only fully supported activation function is 'Sigmoid'.
If you are using the default Sigmoid
activation function with
the default parameter values Param1=0
and Param2=0
then the
function used is y = 1.7159*tanh(2/3 * x)
, so the output will
range from [-1.7159, 1.7159], instead of [0,1].
Recall that by definition
tanh(x) = (1 - exp(-2*x)) / (1 + exp(-2*x))
.
Access | public |
Sealed | false |
Static | false |