Skip to content

Commit

Permalink
Merge pull request sjwhitworth#113 from grahamannett/patch-1
Browse files Browse the repository at this point in the history
added softplus relu
  • Loading branch information
sjwhitworth committed Apr 15, 2016
2 parents 07485b6 + 5e631a4 commit e8ce77b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions neural/funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) },
}

0 comments on commit e8ce77b

Please sign in to comment.