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

LSTM API #13

Closed
shiffman opened this issue Oct 30, 2017 · 2 comments
Closed

LSTM API #13

shiffman opened this issue Oct 30, 2017 · 2 comments

Comments

@shiffman
Copy link
Member

This is a proposal for the LSTM library from #2.

I'm imagining something like:

const lstm = new LSTMGenerator('/path/to/model/', 'path/to/variables.json');
let txt = lstm.generate(len, seed, temperature);

I am not at all sure about the naming. I am also wondering if variables.json should be integrated into the model files directory and not treated separately?

@cvalenzuela
Copy link
Member

The LSTM examples 1 and 2 are now implementing this approach:

var lstm = new p5ml.LSTMGenerator('./models/lstm/shakespear/')
let data = {
  seed: 'the queen',
  temperature: 0.5,
  length: 40
}
lstm.generate(data, function(result){
  console.log(result.generated)
});

I also removed the ES6 examples in favor of just ES3 to keep it as simple as possible.

Next step is to update the /training to reflect this changes

@shiffman
Copy link
Member Author

shiffman commented Nov 3, 2017

I went through these examples and did a little clean-up, everything looks great! I'm going to close this issue and file two new ones for some small-ish things (including updating "training").

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

No branches or pull requests

2 participants