// Trains the sample data set on the neural network updating weights for each sample
// using the stochastic gradient descent method.
Trains the sample data set on the neural network updating weights for each sample
using the stochastic gradient descent method.
// Trains the sample data set on the neural network updating weights for each sample // using the stochastic gradient descent method .
func (n *Network) Train(samples, targets [][]float64, learner Learner) {
	for d, sample := range samples {
		outputs := n.Evaluate(sample)
		learner.Learn(outputs, targets[d])
	}
}
func ( n * Network ) Train ( samples , targets [ ] [ ] float64 , learner Learner ) { for d , sample := range samples { outputs := n . Evaluate ( sample ) learner . Learn ( outputs , targets [ d ] ) } }
Trains the sample data set on the neural network updating weights for each sample
using the stochastic gradient descent method.
Trains the sample data set on the neural network updating weights for each sample using the stochastic gradient descent method .