Skip to content

Multi-layer Recurrent Neural Networks (LSTM,RNN) for character-level language models in Python using Tensorflow.

License

Notifications You must be signed in to change notification settings

sfailsthy/char-rnn-tensorflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

char-rnn-tensorflow

Multi-layer Recurrent Neural Networks (LSTM,RNN) for character-level language models in Python using Tensorflow.

Requirments

  • Python 3.6.1
  • TensorFlow 1.3.0

Generate English text

To train:

python train.py --input_file data/shakespeare.txt --name shakespeare --num_steps 50 --num_seqs 32 --learning_rate 0.01 --max_steps 20000

To sample

python sample.py --converter_path shakespeare/converter.pkl --checkpoint_path shakespeare/model/ --max_length 1000

Generate Chinese Poetries

To train

python train.py --use_embedding --input_file data/poetry.txt --name poetry --learning_rate 0.005 --num_steps 26 --num_seqs 32 --max_steps 10000

To sample

python sample.py --use_embedding --converter_path poetry/converter.pkl --checkpoint_path poetry/model/ --max_length 300

Generate Chinese Novels

To train

python train.py --use_embedding True --input_file data/novel.txt --num_steps 80 --name novel --learning_rate 0.005 --num_seqs 32 --num_layers 3 --embedding_size 256 --lstm_size 256 --max_steps 1000000

To sample

python sample.py --converter_path novel/converter.pkl --checkpoint_path  novel/model/ --use_embedding --max_length 2000 --num_layers 3 --lstm_size 256 --embedding_size 256

Generate Chinese Lyrics

To train

python train.py --input_file data/jay.txt --num_steps 20 --batch_size 32 --name jay --max_steps 5000 --learning_rate 0.01 --num_layers 3 --use_embedding

To sample

python sample.py --converter_path jay/converter.pkl --checkpoint_path  jay/model/ --max_length 500 --use_embedding --num_layers 3 --start_string 我知道

Generate Linux Code

To train

python train.py --input_file data/linux.txt --num_steps 100 --name linux --learning_rate 0.01 --num_seqs 32 --max_steps 20000

To sample

python sample.py --converter_path linux/converter.pkl --checkpoint_path  linux/model/ --max_length 1000

Generate Japanese Text

To train

python train.py --input_file data/jpn.txt --num_steps 20 --batch_size 32 --name jpn --max_steps 10000 --learning_rate 0.01 --use_embedding

To sample

python sample.py --converter_path jpn/converter.pkl --checkpoint_path jpn/model/--max_length 1000 --use_embedding

Learn RNNs

Acknowledgement

About

Multi-layer Recurrent Neural Networks (LSTM,RNN) for character-level language models in Python using Tensorflow.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy