Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BiLn = Activation{ Activate: func(f float64) float64 { if f == 0 { return 0 } if f > 0 { return math.Log(1 + f) } return -math.Log(1 - f) }, Derivative: func(f float64) float64 { if f == 0 { return 1 } if f > 0 { return 1 / (1 + f) } return 1 / (1 - f) }, }
View Source
var ReLU = Activation{ Activate: func(f float64) float64 { return max(0, f) }, Derivative: func(f float64) float64 { if f > 0 { return 1 } return 0 }, }
View Source
var Sigmoid = Activation{ Activate: sigmoid, Derivative: func(f float64) float64 { s := sigmoid(f) return s * (1 - s) }, }
View Source
var Tanh = Activation{ Activate: math.Tanh, Derivative: func(f float64) float64 { t := math.Tanh(f) return 1 - t*t }, }
Functions ¶
This section is empty.
Types ¶
type Activation ¶
func Linear ¶
func Linear(slope float64) Activation
func Scale ¶
func Scale(General Activation, factor float64) Activation
func Strech ¶
func Strech(General Activation, factor float64) Activation
type Model ¶
type Model struct {
Weights []mat.Mutable
Internal Activation
Output Activation
}
func NewModel ¶
func NewModel(source *rand.Rand, Internal Activation, Output Activation, layers ...int) *Model
func (Model) OutputSize ¶
type TrainingContext ¶
Click to show internal directories.
Click to hide internal directories.