text generation and summarization
Dependencies
python summarize.py --url https://en.wikipedia.org/wiki/George_W._Bush --num_sentences 10
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python generate.py --name patriotAct --url http://www.genekogan.com/txt/patriotAct.txt --nb_epochs 1 --max_epochs 50 --rnn_size 512 --num_layers 2
for Keras, large texts are good to offload to GPU.
export PATH=/usr/local/cuda/bin:$PATH
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python lstm_text_generation.py
Amazon EC2 AMI for running Keras on AWS. Best to use an instance with high GPU performance (e.g. g2.8xlarge works well for me).