user9856145
user9856145

Reputation:

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?

Upvotes: 4

Views: 1261

Answers (1)

Robert Plummer
Robert Plummer

Reputation: 652

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.

Upvotes: 4

Related Questions