func (shc *StochasticHillClimber) resetParametersToRandom(cortex *ng.Cortex) {

	neurons := cortex.Neurons
	for _, neuronNode := range neurons {
		for _, cxn := range neuronNode.Inbound {
			cxn.Weights = ng.RandomWeights(len(cxn.Weights))
		}
		neuronNode.Bias = ng.RandomBias()
	}

}
Beispiel #2
0
func randomWeights(length int) []float64 {
	return ng.RandomWeights(length)
}