brain.js icon indicating copy to clipboard operation
brain.js copied to clipboard

[Question] I'm seeing null weights on my neural net JSON export - am I doing it right?

Open michaelonubogu opened this issue 7 years ago • 1 comments

In my project, I train 2 neural nets with separate data, export both to 2 separate JSON objects, and then save them to 2 separates files. When I examine both I see that

  • file A has weights that are not null
  • file B has null weights.

The shape of the data I use to train them are the same, but the data for each net comes from 2 different places

{ "input": [n], "output": { "topic": 1}}

My question is - Is this normal or am I doing it right? I ask because I have no knowledge of machine learning and I'm just genuinely curious on why the weights are null vs. not null. I can also paste copies of the export if anyone needs me to here.

Any insight on this would be appreciated. On a different note - I am seriously loving brainjs. Using it on a passion project of mine which I hope to deploy sometime later.

Thanks again for this pretty cool library.

michaelonubogu avatar May 11 '19 17:05 michaelonubogu

Actually figured it out a while back - forgot to put it here. My input array size was varied across my training data set. Setting the input array size to a fixed length eliminated the null weights - I now see values for the weights.

michaelonubogu avatar May 20 '19 15:05 michaelonubogu