brain icon indicating copy to clipboard operation
brain copied to clipboard

Hitting Error " Cannot read property Bias of undefined" on using toJSON and fromJSON

Open sriram-dev opened this issue 11 years ago • 3 comments

After training my network, i tried to get the json and load onto another network. I am hitting this error while doing that .

var net = new brain.NeuralNetwork({learningRate: 0.3});
net.train(game.data.nndata, {log:true, errorThresh:0.02, logPeriod:100, iterations:100});
var json = net.toJSON();
var net1 = new brain.NeuralNetwork();
net1.fromJSON(json); // hitting the error here

Please add usage examples for using toJSON and fromJSON if something is wrong with the way its done above.

sriram-dev avatar Mar 17 '14 05:03 sriram-dev

What does game.data.nndata look like? This works fine for me with the XOR example from the README.

achalddave avatar Jun 20 '14 04:06 achalddave

Any idea, why the issue would be fixed, This is a big show stopper to use it for time consuming training.

kalyankdas avatar Sep 07 '14 21:09 kalyankdas

I believe if I had access to the source, to reproduce, I could solve this easily. Let me know if you can do that.

robertleeplummerjr avatar Dec 21 '16 14:12 robertleeplummerjr