Exemple #1
0
func TestDump(t *testing.T) {
	network := neural.NewNetwork(3, []int{3, 3})
	engine := New(network)
	engine.Start()

	dump := persist.ToDump(network)
	dumpEng := engine.Dump()

	assert.Equal(t, dump.Enters, dumpEng.Enters)
}
Exemple #2
0
func (e *engine) dump(req *request) {
	r := *req
	resp := r[0].(chan *persist.NetworkDump)

	resp <- persist.ToDump(e.Network)
}