示例#1
0
文件: rich.go 项目: PeterCxy/gotgbot
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()
}
示例#2
0
func loadNetwork() *neural.Network {
	return persist.FromFile(jsonFile)
}