Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

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

Open
sriram-dev opened this issue Mar 17, 2014 · 3 comments

Comments

@sriram-dev
Copy link

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.

@achalddave
Copy link

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

@kalyankdas
Copy link

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

@robertleeplummerjr
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants