-
Notifications
You must be signed in to change notification settings - Fork 451
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is super clear! Maybe @shiffman has more inputs for the examples? Is there a more friendly version of slicing a string in p5? (generate(currentText.slice(-1), true);
)
|
||
// start autogenerating | ||
function onStartButton() { | ||
if(currentText == '') generateWithFullInputText(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a style comment: we writing if/else statements with { }
instead of inline.
// Generate new text | ||
function generate(seed, stateful) { | ||
// prevent starting inference if we've already started another instance | ||
// TODO: is there better JS way of doing this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also handle this from the src. Adding await tf.nextFrame();
in generateInternal()
will wait for tf before computing another pass
* first example to test lstm updates * add runningInference check to LSTM examples to avoid running model simultaneously multiple times * added basic working Stateful LSTM example * remove LSTM Text Mixer example * fix LSTM stateful example if else code style * LSTM stateful example visualises probability distributions * adding new model and feaute extractor example * updates to new api
updates to the LSTM examples to make compatible with the PR for stateful LSTM. Also, an example for stateful LSTM.