Not long ago I downloaded all the Messenger discussions I had with a friend. There were around 10,000 messages and I tough it would be fun to train an AI to learn these discussions, our way to write messages, and come up with discussions on its own.
To do that I use the Torch-rnn which is model of recurrent neural network designed to learn text. It’s base on Char-rnn
I developed a shell script to improve my workflow and make this wonderful tool more accessible.
Torch-rnn quickstart
built on the torch-rnn docker container.
Requirements
How to use
./torch-rnn-quickstart.sh <data.txt> [train, sample]
data.txt
is the textyou want to feed the neural net for training
Training
./torch-rnn-quickstart.sh <data.txt> train
training parameters can be changes from the file training.conf
generated in the corresponding folder (same path and name than the <data.txt>
)
By default, the checkpoint with the most iterations will be used to continue training from.
Sampling
./torch-rnn-quickstart.sh <data.txt> sample
training parameters can be changes from the file sampling.conf
generated in the corresponding folder (same path and name than the <data.txt>
)
By default, the checkpoint with the most iterations will be used for sampling.