Exemplo n.º 1
0
func Init(path string) {
	file = path + "/rich.json"
	if _, err := os.Stat(file); err != nil {
		network = neural.NewNetwork(common.SampleLen, []int{1000, 1000, 2})
		//network.RandomizeSynapses()
	} else {
		network = persist.FromFile(file)
	}
	//network.RandomizeSynapses()
	eng = engine.New(network)
	eng.Start()
}
Exemplo n.º 2
0
func loadNetwork() *neural.Network {
	return persist.FromFile(jsonFile)
}