Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Extend pre-trained model without load old trainedData #720

Discussion options

For checked example at https://scrimba.com/learn/neuralnetworks/neural-networks-example-simple-reinforcement-learning-cpkKyHd and it can be acceptable idea for small datasets to call them again and push new rows to trainingArray

but if you have very bir pre-trained model with huge dataset (and goes to bigger with new rows), it is not usable with them.

There must be a solution to add new data and train with it without call old trained datasets.

Are there?

You must be logged in to vote

Call .train on a network that has been previously trained, or that has been instantiated from jSON will allow it to train again. Note that it would be important to include both old training data and new, so long as it fits the criteria for previously trained data.

Replies: 3 comments 4 replies

Comment options

It seems that brain js do not have evolve function.
and keepnetwork intact seems buggy.

You must be logged in to vote
0 replies
Comment options

Call .train on a network that has been previously trained, or that has been instantiated from jSON will allow it to train again. Note that it would be important to include both old training data and new, so long as it fits the criteria for previously trained data.

You must be logged in to vote
1 reply
Comment options

ty for the amazing lib
so if we call train() on a trained network it removes all old trains and retrains the network again?

Answer selected by robertleeplummerjr
Comment options

No it does not so long as it was either trained or hydrated from `net.fromJSON()`>
...
On Mon, Apr 25, 2022, 8:05 PM ahmaddie1378 ***@***.***> wrote: ty for the amazing lib so if we call train() on a trained network it removes all old trains and retrains the network again? — Reply to this email directly, view it on GitHub <#720 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAFFZOZD34JWDWNRUV5VH53VG4XMBANCNFSM47KXI7QQ> . You are receiving this because you commented.Message ID: <BrainJS/brain. ***@***.***>
You must be logged in to vote
3 replies
Comment options

ty so much for the answer
that is really nice
i have another question
what happens if we load from pre-trained json and dont call old data and just call train() with new data ?

Comment options

It will alter the weights of the previously trained model to whatever the new data is. This can be beneficial, but if the data doesn't include what the network was previously trained on, with the new training data, the network can and will eventually forget those training sets.

Comment options

now i understand ty for help
so we put old data and new data into the same array and pass it to train() ?
or we use keepnetwork intact example (that one connects old data with the new one) ?

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

AltStyle によって変換されたページ (->オリジナル) /