Reputation: 897
I have trained the imdb_lstm.py on my PC. Now I want to test the trained network by inputting some text of my own. How do I do it? Thank you!
Upvotes: 2
Views: 3146
Reputation: 1573
So what you basically need to do is as follows:
Upvotes: 8
Reputation: 31
This might help. http://keras.io/models/
Here is an sample usage. How to use keras for XOR
Probably you have to convert ur corpus into ndarray first and throw it to your model.predict
From what it seem so far the model.predict input of the training model should be 100 words corpus which represent an index of each word in dictionary. So if you want to train it with ur corpus, you have to convert ur corpus according to those dictionary and see if the result is 0 or 1
Upvotes: 1