forked from BrainJS/brain.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix LSTM training continuity for cloned nets
Fixes BrainJS#949 Update `src/recurrent.ts` to ensure cloned LSTM nets continue training from the point where the original stopped. * Add `fromJSON` method to properly restore the training state. * Modify `train` method to account for the state of the cloned net. * Update `trainPattern` method to consider the previous training state of the cloned net. * Adjust `initialize` method to handle state restoration for cloned nets. * Ensure `runInputs` method maintains continuity in training for cloned nets. Add a test case in `src/recurrent/lstm.test.ts` to verify that training a cloned LSTM net continues evolving from the point where the original stopped.
- Loading branch information
1 parent
7c9db32
commit 004c32c
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters