synaptic
synaptic copied to clipboard
Fail to save and reuse a network
@Jabher points some data is lost by toJSON in #112. I don't find a problem there, however i'm having trouble while trying to reuse a network thought page loads.
var brain = synaptic.Network.fromJSON(JSON.parse(localStorage[key]));
(... training ... using ...)
localStorage[key] = JSON.stringify(brain.toJSON());
...unhappily after page reload the network is not acting as before.
How to solve this problem now (before v2)?
Do you have an example of the network? Here I tried a simple Perceptron + XOR, the first time you run it, it trains the network, stores it in LS, and activates it. The next times it will retrieve it from LS and activate it. You get the exact same result every time: https://jsfiddle.net/jrwqaxbp/6/