Difference between revisions of "RNNs with Darknet"
Jump to navigation
Jump to search
Line 30: | Line 30: | ||
./darknet rnn train cfg/rnn.train.cfg -file filename.txt | ./darknet rnn train cfg/rnn.train.cfg -file filename.txt | ||
− | + | *Generating new text with our new model | |
− | *Generating new text | + | ./darknet rnn generate cfg/rnn.cfg filename.weights -srand 0 |
− | ./darknet rnn generate cfg/rnn.cfg | ||
*Optional: We can modify file cfg/rnn.train.cfg file (batch = 50 is the value we set by default, the original value was 256) | *Optional: We can modify file cfg/rnn.train.cfg file (batch = 50 is the value we set by default, the original value was 256) | ||
− | |||
*More info: | *More info: | ||
*https://pjreddie.com/darknet/rnns-in-darknet/ | *https://pjreddie.com/darknet/rnns-in-darknet/ | ||
Terminal basic tutorial: https://maker.pro/linux/tutorial/basic-linux-commands-for-beginners | Terminal basic tutorial: https://maker.pro/linux/tutorial/basic-linux-commands-for-beginners |
Revision as of 21:08, 15 January 2019
Installing Darknet
- We need to install our modified version of Darknet:
- Darknet Installation
Using RNNs with Darknet
- Getting some calculated weights from several writers:
wget https://pjreddie.com/media/files/shakespeare.weights wget https://pjreddie.com/media/files/kant.weights wget https://pjreddie.com/media/files/tolstoy.weights
- Generating new text
./darknet rnn generate cfg/rnn.cfg shakespeare.weights -srand 0
- Parameters:
-srand N -> N determines the random seed
- Training with other corpus of text
- Download a text file. Some corpus of text online:
George Meredith http://www.gutenberg.org/ebooks/4500 Mark Twain http://www.gutenberg.org/ebooks/3200 More http://www.gutenberg.org/ebooks/search/?query=The+Complete+Works+of
- We train the neural network with the new text (This might take a while):
./darknet rnn train cfg/rnn.train.cfg -file filename.txt
- Generating new text with our new model
./darknet rnn generate cfg/rnn.cfg filename.weights -srand 0
- Optional: We can modify file cfg/rnn.train.cfg file (batch = 50 is the value we set by default, the original value was 256)
Terminal basic tutorial: https://maker.pro/linux/tutorial/basic-linux-commands-for-beginners