Skip to content

A Character Level Recurrent Neural Network in Pytorch

Notifications You must be signed in to change notification settings

rutvij-25/CharRNN-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CharRNN-pytorch

Pytorch implementation of Character level recurrent neural network to generate text

train.py

Use your own text data and name it data.txt Then run

python train.py

Your model will be saved in pretrained folder

Argument Parse Default
Embedding Dimension --embed_dim 65
Dropout --dropout 0.1
Hidden Size --hidden_size 50
Number of LSTM layers --num_layers 2
Batch Size --batch_size 100
Chunk Size --chunk_size 200
Epochs --epochs 200
Learning Rate --lr 0.01
Root directory of data --root data.txt
Save the model every N epochs --save_every 50

generate.py

Arguement Parse Default
Initial Text --initialtext Where
Temperature --temperature 1
Number of Letters to Generate --n 100
Root directory of data --root data.txt

Output

python generate.py --n 200
Where of call, let all not no Risent us thy do.

BETHE:
Ay, that we onoth be miled to did; and
That here and manesty
Nabtalmy most evancion they stash?
You bick'd gelolot part? then bloinopt.        

LADY MACBETH

About

A Character Level Recurrent Neural Network in Pytorch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages