When Brain JS is training, Google Chrome browser tab becomes unresponsive/crashes and only becomes responsive again after training is complete, which could take many minutes.
When running in Google Chrome from index.html file
*.html file locally on Macbook: https://codepen.io/sts-ryan-holton/pen/RwweqEX5
The browser tab should remain responsive during training as deploying Brain JS to a production site could cause the whole browser tab to crash on slower systems.
Training is computationally expensive, so you should try to train the network offline (or on a Worker) and use the toFunction() or toJSON() options to plug the pre-trained network into your website.
There are following ways to avoid this:
@mubaidr I've already looked at both parts of the documentation, and have tried using the JSON feature in another issue I've opened and can't see any difference, please provide a code example on how to use this?
In your case it seems like data is not enough. Network is not able to reach error threshold. Please enable log: true in training option, as specified here: https://github.com/BrainJS/brain.js#training-options
Most helpful comment
There are following ways to avoid this: