-
Notifications
You must be signed in to change notification settings - Fork 903
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
Training LSTM model #2
Comments
The script you reference, transforms the original Keras model (saved as one .h5 file) to Tensorflow checkpoints. These are the files deeplearn.js uses to create a I think for now, the best approach is to point students to the |
Makes sense, I'll try to train a slightly better model in the morning and show how to run https://github.com/shiffman/NOC-S17-2-Intelligence-Learning/wiki/Python-Environment-Setup |
If you run it with the complete text on your computer it will take forever. Try with just a part of it instead. I haven't played with the hidden layers that much, but that should also influence the result. I'm also writing this: https://github.com/cvalenzuela/hpc |
One thing you could do is write the keras LSTM implementation in deeplearn.js using the RNN cell, and then modify our dump checkpoint script so that it's suited to dump exactly what you need. Did you ever get that LSTM keras model working from before? |
I couldn't get the Keras model to work. Here is what I was doing, I'm sure I'm doing something wrong with the encoding. I'm now going to try with a model that was trained without keras, just tf. |
oh oops, I missed this thread when filing #12, I'll take a look and see about porting to the simpler "plainjs" examples! Should I discuss and show |
Love the demo! Let me know if there's any feedback you have for us about what we can make easier. |
FYI - there's a thread in our repo that is curious about this if you want to show off the demo! |
thanks @nsthorat. We still need to clean the code a little bit and refactor, but I'll post it! @shiffman, I will rewrite the instructions to use the |
Yes! It's a little bit odd to start building the library out with LSTM as the first stop, but since it's what we're using in A2Z right now I guess it makes sense. I'm imagining a more OOP style API, something like: const lstm = new LSTMGenerator('/path/to/model/', 'path/to/variables.json');
let txt = lstm.generate(len, seed, temperature); Does that make sense do you think? We can move this to a separate thread. I am not at all sure about the naming. But at least I tried to use Maybe the |
yes, that makes sense! let's move this to another thread to keep track of it |
Great, will leave this open, you can close once the |
The |
@nsthorat and @cvalenzuela have an e-mail thread about this, but adding here to track going forward.
At the moment the LSTM example uses a model trained with this script from deeplearn.js. Eventually we want to train the LSTM in browser, but before that I thought it might be simpler to demonstrate the training with a keras model using this example from my class last year.
@cvalenzuela attempted to use this script to convert the model from my example but the output isn't working just yet.
Shall we do more work to get the keras trained example to be compatible or point students towards
train.py
that's in deeplearn.js if they want to train their own model?Did I get this right?
The text was updated successfully, but these errors were encountered: