BrainJS/brain.js ? reverse-engineered prompt
Reverse engineered prompt
I'd like to create a JavaScript library for building neural networks that's easy for web developers to use. It should be able to run in both the browser and in Node.js, and it's really important that it can use the GPU to accelerate the training process, making it much faster.
The API should be simple and intuitive. A user should be able to create a network, train it with an array of data, and then use that trained model to make predictions on new inputs. Let's support a few different kinds of networks, including standard feed-forward ones and also recurrent types like LSTMs or GRUs for handling sequences. Also, include a feature to export the trained network to a JSON file and then load it back in later, so you don't have to retrain it every time. It should be easily installable via npm or usable directly in a webpage from a CDN link.
Are you gonna build this?
make sure you review the code using coderabbit