示例#1
0
func createNetwork() {

	n := neural.NewNetwork(9, []int{9, 9, 4})
	n.RandomizeSynapses()

	persist.ToFile(jsonFile, n)
}
示例#2
0
func createLangNetwork() {
	if _, err := os.Stat(jsonFile); err == nil {
		return
	}
	n := neural.NewNetwork(sampleLen, []int{1000, 1000, 3})
	n.RandomizeSynapses()

	persist.ToFile(jsonFile, n)
}
示例#3
0
func saveNetwork(n *neural.Network) {
	persist.ToFile(jsonFile, n)
}
示例#4
0
文件: rich.go 项目: PeterCxy/gotgbot
func Save() {
	persist.ToFile(file, network)
}