Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvaluateLayer ¶
EvaluateLayer evaluates the outut of each layer
func HiddenLayerMatrix ¶
HiddenLayerMatrix calculates the matrix of a hidden layer given a matrix of input Each row of X corresponds to an input vector to the layer.
Types ¶
type ActivationFunc ¶
ActivationFunc function is a function that takes a value as input and returns a float value corresponding to the output of a neuron
type Neuron ¶
type Neuron struct { Weights []float64 ActivationFunc ActivationFunc }
Neuron represents a neuron
func RandomNeuronFactory ¶
func RandomNeuronFactory(n int, rng *rand.Rand, a ActivationFunc) Neuron
RandomNeuronFactory creates a neuron with randomly initialized weights
func RandomReluNeuronFactory ¶
RandomReluNeuronFactory is a convenience function that produce a neuron with random weights and a relu activation function
func RandomSigmoidNeuronFactory ¶
RandomSigmoidNeuronFactory is a convenience function that produce a neuron with random weights and a sigmoid activation
func (Neuron) Activation ¶
Activation calculates the actuvation of the current neuron