1
0
mirror of https://github.com/sjwhitworth/golearn.git synced 2025-04-26 13:49:14 +08:00

Merge pull request #113 from grahamannett/patch-1

added softplus relu
This commit is contained in:
Stephen Whitworth 2016-04-15 07:57:23 +01:00
commit e8ce77bb05

View File

@ -17,3 +17,11 @@ var Linear NeuralFunction = NeuralFunction{
func(v float64) float64 { return v },
func(v float64) float64 { return 1.0 },
}
// Rectified Linear function
// https://www.wikiwand.com/en/Rectifier_(neural_networks)
var SoftplusRectifier NeuralFunction = NeuralFunction{
func(v float64) float64 { return math.Log(1 + math.Exp(v))},
func(v float64) float64 { return v * (1 - v) },
}