feedforward

package
v0.0.0-...-8085192 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Batch

type Batch struct {
	DataList []DataGroup
}

type DataGroup

type DataGroup struct {
	Input        []float64
	Expected     []float64
	LearningRate float64
}

should be arrays in the future

type Layer

type Layer struct {
	Activations      []float64
	WeightedInputs   []float64
	DerivativeValues []float64
	Weights          []float64
	Biases           []float64
	WeightGradients  []float64
	BiasGradients    []float64
	Inputs           []float64

	NeuronInCount       int
	NeuronOutCount      int
	GradientUpdateCount int
}

func CreateLayer

func CreateLayer(neuronsIn, neuronsOut int) Layer

func (*Layer) ApplyGradients

func (l *Layer) ApplyGradients(learningRate, count float64)

func (*Layer) ClearGradients

func (l *Layer) ClearGradients()

func (*Layer) Combine

func (l *Layer) Combine(other *Layer) *Layer

func (*Layer) ComputeDerivativesBackPropagation

func (l *Layer) ComputeDerivativesBackPropagation(front *Layer)

func (*Layer) ComputeDerivativesBackPropagationOutputLayer

func (l *Layer) ComputeDerivativesBackPropagationOutputLayer(expectedOutput []float64)

func (*Layer) FeedForward

func (l *Layer) FeedForward(incoming *Layer) *Layer

returns just a pointer to the current layer

func (*Layer) FeedInput

func (l *Layer) FeedInput(input []float64) *Layer

func (*Layer) FetchWeight

func (l *Layer) FetchWeight(in, out int) float64

func (*Layer) ResetGradients

func (l *Layer) ResetGradients()

func (*Layer) UpdateGradients

func (l *Layer) UpdateGradients()

type NeuralNetwork

type NeuralNetwork struct {
	LayerList   []Layer
	FinalOutput []float64
}

func CreateNeuralNetwork

func CreateNeuralNetwork(inputCount int, neuronCount ...int) *NeuralNetwork

func (*NeuralNetwork) ClearGradients

func (n *NeuralNetwork) ClearGradients()

func (*NeuralNetwork) Combine

func (n *NeuralNetwork) Combine(other *NeuralNetwork)

func (*NeuralNetwork) FeedForward

func (n *NeuralNetwork) FeedForward(input []float64)

func (*NeuralNetwork) GetResult

func (n *NeuralNetwork) GetResult() []float64

func (*NeuralNetwork) Train

func (n *NeuralNetwork) Train(d *DataGroup)

func (*NeuralNetwork) TrainDataParallel

func (n *NeuralNetwork) TrainDataParallel(dataGroups []DataGroup, learningRate float64, cycleCount int)

learning rate in dataGroups not used

func (*NeuralNetwork) TrainWithoutApplyingGradients

func (n *NeuralNetwork) TrainWithoutApplyingGradients(d *DataGroup)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL