gonn

package
v0.0.0-...-99c21b0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MyNetwork

type MyNetwork struct {
	// contains filtered or unexported fields
}

func (*MyNetwork) ArealMutation

func (self *MyNetwork) ArealMutation(areaRate, mutationRate float64)

func (*MyNetwork) GetWeights

func (self *MyNetwork) GetWeights() [][][]float64

func (*MyNetwork) Init

func (self *MyNetwork) Init(neurons []int)

func (*MyNetwork) Load

func (self *MyNetwork) Load(filename string)

func (*MyNetwork) NodeCount

func (self *MyNetwork) NodeCount() (count int)

func (*MyNetwork) Predict

func (self *MyNetwork) Predict(inputData []float64) []float64

func (*MyNetwork) Save

func (self *MyNetwork) Save(filename string)

func (*MyNetwork) SetWeights

func (self *MyNetwork) SetWeights(nw [][][]float64)

func (*MyNetwork) SingleTrain

func (self *MyNetwork) SingleTrain(inputData []float64, outputData []float64)

func (*MyNetwork) Train

func (self *MyNetwork) Train(trainingData [][][]float64, epochs int, learningRate float64, debug bool)

type Network

type Network struct {
	// contains filtered or unexported fields
}

Network is containing all the needed settings/variables.

func Load

func Load(bs []byte) (*Network, error)

func NewNetwork

func NewNetwork(ls []int) (*Network, error)

NewNetwork is for creating a new network with the defined layers.

func (*Network) Export

func (n *Network) Export(w io.Writer) error

func (*Network) GetWeights

func (n *Network) GetWeights() [][][]float64

func (*Network) Predict

func (n *Network) Predict(input []float64) []float64

Predict calculates the output for the given input

func (*Network) SetWeights

func (n *Network) SetWeights(nw [][][]float64)

func (*Network) Train

func (n *Network) Train(trainingData [][][]float64, epochs int, lrate float64, debug bool)

Train is for training the network with the specified dataset, epoch and learning rate The last bool parameter is for tracking where the training is. It'll log each epoch.

Jump to

Keyboard shortcuts

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