Skip to content

Conversation

arisanguinetti
Copy link
Contributor

I'm a noobie on testing, not even sure if what I made is correct. I've created a random NN and saved the initial status. then trained the NN 100 times and compared the output with a stored target NN. I think this was mentioned in issue #53 by @shiffman

@GhostRabbit
Copy link

Tests of nn.js is desperatly needed but I fear that running a network for 100 iterations can quickly result in the smell of slow tests. But slow tests are better then no tests!

let nn = NeuralNetwork.deserialize(defaultNN);

for (let i = 0; i < (training_data.length * 100); i++) {
let index = i % training_data.length;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should randomize the index to train the NN better probably like :-
let index = Math.random() * training_data.length | 0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants