Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug with LSTM model initialization #952

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rizmyabdulla
Copy link

Fixes #948

Initialize the equations property in the LSTM class constructor in src/recurrent/lstm.ts.

  • Ensure the equations property is properly populated before it is accessed in the get method of the LSTM class.
  • Initialize the equations property in the LSTMTimeStep class constructor in src/recurrent/lstm-time-step.ts.
  • Ensure the equations property is properly populated before it is accessed in the getEquation method of the LSTMTimeStep class.
  • Add test cases in src/recurrent/lstm-time-step.test.ts to verify that the equations property is properly initialized and populated.
  • Add end-to-end test cases in src/recurrent/lstm-time-step.end-to-end.test.ts to verify that the LSTM model correctly trains and produces the expected output values.

Fixes BrainJS#948

Initialize the `equations` property in the `LSTM` class constructor in `src/recurrent/lstm.ts`.

* Ensure the `equations` property is properly populated before it is accessed in the `get` method of the `LSTM` class.
* Initialize the `equations` property in the `LSTMTimeStep` class constructor in `src/recurrent/lstm-time-step.ts`.
* Ensure the `equations` property is properly populated before it is accessed in the `getEquation` method of the `LSTMTimeStep` class.
* Add test cases in `src/recurrent/lstm-time-step.test.ts` to verify that the `equations` property is properly initialized and populated.
* Add end-to-end test cases in `src/recurrent/lstm-time-step.end-to-end.test.ts` to verify that the LSTM model correctly trains and produces the expected output values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Weird bug with brain.js
1 participant