Documentation ¶
Overview ¶
Basic neural network
Index ¶
- func Randoms(rows, columns int) *mat64.Dense
- func Scrape(trainingData [][][]float64) (*mat64.Dense, *mat64.Dense)
- func Sigmoid(value float64) float64
- func SigmoidActivate(m *mat64.Dense) *mat64.Dense
- func SigmoidPrime(value float64) float64
- func SigmoidPrimeActivate(m *mat64.Dense) *mat64.Dense
- type Alec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SigmoidActivate ¶
Activation function -> currently only uses sigmoid function
func SigmoidPrime ¶
Helper function that applies the derivative of the sigmiod function to a value
Types ¶
type Alec ¶
type Alec struct { LearningRate float64 NumOfIterations int HiddenNeurons int InputSynapses *mat64.Dense // Connections between neurons OutputSynapses *mat64.Dense // Connections between neurons HiddenNeuronSum *mat64.Dense // Sums and results coming in and out of each neuron HiddenNeuronResults *mat64.Dense NeuronOutputSum *mat64.Dense NeuronOutputResults *mat64.Dense }
func (*Alec) BackPropagate ¶
The following process is based off a formula used to determine the changes in weights required at each layer. These changes in weights are then added to the original weights to calibrate the network. The formula deals with the derivative of the activation function and applying it to the changes.
func (*Alec) ForwardPropagate ¶
Helper function to use forward propagation on the network
Click to show internal directories.
Click to hide internal directories.