func (nn *FeedForward) SetContexts(nContexts int, initValues [][]float64) {
	if initValues == nil {
		initValues = make([][]float64, nContexts)
		for i := 0; i < nContexts; i++ {
			initValues[i] = vector(nn.NHiddens, 0.5)
		}
	}
	nn.NContexts = len(initValues)
	nn.ContextWeights = make([][][]float64, nn.NContexts)
	nn.ContextChanges = make([][][]float64, nn.NContexts)
	for i := 0; i < nn.NContexts; i++ {
		nn.ContextWeights[i] = matrix(nn.NHiddens, nn.NHiddens)
		nn.ContextChanges[i] = matrix(nn.NHiddens, nn.NHiddens)
		for j := 0; j < nn.NHiddens; j++ {
			for k := 0; k < nn.NHiddens; k++ {
				nn.ContextWeights[i][j][k] = random(-1, 1)
			}
		}
	}
	nn.Contexts = initValues
}
/*
Set the number of contexts to add to the network.

By default the network do not have any context so it is a simple Feed Forward network,
when contexts are added the network behaves like an Elman's SRN (Simple Recurrent Network).

The first parameter (nContexts) is used to indicate the number of contexts to be used,
the second parameter (initValues) can be used to create custom initialized contexts.

If 'initValues' is set, the first parameter 'nContexts' is ignored and
the contexts provided in 'initValues' are used.

When using 'initValues' note that contexts must have the same size of hidden nodes + 1 (bias node).
package gobrain
import (
	"fmt"
	"log"
	"math"
)
type FeedForward struct {
	NInputs, NHiddens, NOutputs, NContexts int
	Regression bool
	InputActivations, HiddenActivations, OutputActivations []float64
	Contexts [][]float64
	InputWeights, OutputWeights [][]float64
	ContextWeights              [][][]float64
	InputChanges, OutputChanges [][]float64
	ContextChanges              [][][]float64
}
func (nn *FeedForward) Init(inputs, hiddens, outputs int) {
	nn.NInputs = inputs + 1    
	nn.NHiddens = hiddens + 1  
	nn.NOutputs = outputs
	nn.InputActivations = vector(nn.NInputs, 1.0)
	nn.HiddenActivations = vector(nn.NHiddens, 1.0)
	nn.OutputActivations = vector(nn.NOutputs, 1.0)
	nn.InputWeights = matrix(nn.NInputs, nn.NHiddens)
	nn.OutputWeights = matrix(nn.NHiddens, nn.NOutputs)
	for i := 0; i < nn.NInputs; i++ {
		for j := 0; j < nn.NHiddens; j++ {
			nn.InputWeights[i][j] = random(-1, 1)
		}
	}
	for i := 0; i < nn.NHiddens; i++ {
		for j := 0; j < nn.NOutputs; j++ {
			nn.OutputWeights[i][j] = random(-1, 1)
		}
	}
	nn.InputChanges = matrix(nn.NInputs, nn.NHiddens)
	nn.OutputChanges = matrix(nn.NHiddens, nn.NOutputs)
}