Esempio n. 1
0
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()
	}

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