Neural networks, which try to work like the human brain, learn to perform tasks based on given examples. Neural network have layers, and the smallest neural network must have at least two layers: input and output. During the training phase, data flows through the layers of the neural network. The actual output values of the training data are used to correct the calculated output values of the training data so that the next iteration will be more precise.
The utility that will be developed in this section is named neural.go, and it will implement a really simple neural network. This is going to be presented in four parts.
The first part of neural.go is as follows:
package main import ( "fmt" "math/rand" "time" "github.com/goml/gobrain" )
The new line in the import list tells the gofmt tool to sort...