Skip to content

KangHyunWook/Text-Generation-using-LSTM-RNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text-Generation-using-LSTM-RNN

Youtube link: https://www.youtube.com/watch?v=0Q_5UauapLk&list=PLzbU4Lcv-48q-eBuAtu9tdYmn5q_nGaEV&index=2

The text data(Peter Pan in this example) is from Project Gutenberg
-https://www.gutenberg.org/ebooks/16

How to run

Below command will train the model and save the model weights

python train.py

Generating the texts

  • Provide the name of the saved model with -w keyword followed by the program name
e.g. python test.py -w model-weights-01-2.7223.hdf5

Additional Info

It took more than 6days with my laptop, in which the cpu is 'Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz 1.80GHz'
However, less than 2hours with GPU 'RTX 3070 ti' with the following hyper-parameters

num. of epochs: 50
batch_size: 64
optimizer: adam
loss: categorical crossentropy
window_size(length of input characters): 100

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages