Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resuming training on a Brain.js Neural Network Model

I am looking to incrementally train a neural net using Brain.js, but can't find a solution using the current version. There is a similar answer to this same problem but it uses a deprecated function parameter keepNetworkIntact. How is this done?


1 Answers

You simply need to import the json into the neural network, and continue training:

const net = new brain.NeuralNetwork();
net.fromJSON(json);
net.train(trainingData, trainingOptions);

The feature was deprecated because we only want to keep the options we absolutely need to keep the api as simple as possible and based off importing json the net can determine what you intend to do next.

like image 179
Robert Plummer Avatar answered Nov 04 '25 11:11

Robert Plummer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!