Пример #1
0
func loadEngine() engine.Engine {
	n := loadNetwork()

	e := engine.New(n)
	e.Start()
	return e
}
Пример #2
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()
}