Nonlinear Activation Functions
This library provides several nonlinear functions commonly used as activation functions in neural networks.
Interface
To use this library, prefix the types and functions below with Nonlinear..
Methods
val sigmoid : real -> realval dsigmoid : real -> realval tanh : real -> realval dtanh : real -> realval sigmoidf : real -> realval sigmoidh : real -> realval sigmoidg : real -> realval softmax : real array * int -> realval exp : real -> realval log : real -> real
Method Overview
sigmoid x- Sigmoid function. Returns
1.0 / (1.0 + (e^(-x))).
- Sigmoid function. Returns
dsigmoid x- Derivative of sigmoid.
tanh (x)- The hyperbolic tangent.
dtanh x.- Derivative of tanh.
sigmoidf x- Alias for the sigmoid function.
sigmoidh x- Returns
2.0 / (1.0 + (e^(-x))) - 1.0.
- Returns
sigmoidg x- Returns
4.0 / (1.0 + (e^(-x))) - 2.0.
- Returns
softmax (arr, n)- The softmax function.
exp x- Returns the base of the natural logarithm raised to the
xth power.
- Returns the base of the natural logarithm raised to the
log x- The natural logarithm.