Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
2017-04-21T11-42-02
COMPLETE_RUNS
GENERATED
GENERATED_SL
__pycache__
data
.gitignore
BRERIN_bot.py
BRERIN_bot_NOgen.py
README.md
Run_Models_and_Generate.sh
Run_Models_and_Generate_2017-02-06T17-39-04-DEFAULT-40epochs.sh
bot_basics.py
data.py
data.pyc
generate_2017-INFINITE-1M.py
generate_2017-INFINITE-1M_October.py
generate_2017-INFINITE-1M_tab.py
generate_2017-INFINITE-1M_tab_inc.py
generate_2017-INFINITE-1M_tab_inc_bursty.py
generate_2017-INFINITE.py
generate_2017-INFINITE_CUDA-po.py
generate_2017-INFINITE_CUDA.py
generate_2017-SL-BE.py
generate_2017-SL-BE_LaptopOPTIMIZED.py
generate_2017-SL-BE_LaptopOPTIMIZED_randTemperature.py
generate_2017-SL-BE_LaptopOPTIMIZED_randTemperature_sentenceLong.py
generate_2017-SL-BE_LaptopOPTIMIZED_randTemperature_sentenceS.py
generate_2017-SL-BE_LaptopOPTIMIZED_randTemperature_singleSentence.py
generate_SL-BE_ChatBot_Aug29.py
generate_pf-INFINITE.py
generate_pf.py
main_June2017.py
main_May2017.py
main_SENSELAB.py
main_pf.py
model.py
ph-deleted
ph-misc
requirements.txt

README.md

Word-level language modeling RNN

This example trains a multi-layer RNN (Elman, GRU, or LSTM) on a language modeling task. By default, the training script uses the PTB dataset, provided. The trained model can then be used by the generate script to generate new text.

python main.py --cuda  # Train an LSTM on ptb with cuda (cuDNN). Should reach perplexity of 113
python generate.py     # Generate samples from the trained LSTM model.

The model uses the nn.RNN module (and its sister modules nn.GRU and nn.LSTM) which will automatically use the cuDNN backend if run on CUDA with cuDNN installed.

The main.py script accepts the following arguments:

optional arguments:
  -h, --help         show this help message and exit
  --data DATA        location of the data corpus
  --model MODEL      type of recurrent net (RNN_TANH, RNN_RELU, LSTM, GRU)
  --emsize EMSIZE    size of word embeddings
  --nhid NHID        humber of hidden units per layer
  --nlayers NLAYERS  number of layers
  --lr LR            initial learning rate
  --clip CLIP        gradient clipping
  --epochs EPOCHS    upper epoch limit
  --batch-size N     batch size
  --bptt BPTT        sequence length
  --seed SEED        random seed
  --cuda             use CUDA
  --log-interval N   report interval
  --save SAVE        path to save the final model