Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yusuketomoto/chainer-char-rnn
karpathy's char-rnn (https://github.com/karpathy/char-rnn) implementation by Chainer
https://github.com/yusuketomoto/chainer-char-rnn
Last synced: 11 days ago
JSON representation
karpathy's char-rnn (https://github.com/karpathy/char-rnn) implementation by Chainer
- Host: GitHub
- URL: https://github.com/yusuketomoto/chainer-char-rnn
- Owner: yusuketomoto
- License: mit
- Created: 2015-06-30T09:22:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-13T13:42:18.000Z (about 7 years ago)
- Last Synced: 2024-08-02T12:21:53.016Z (3 months ago)
- Language: Python
- Size: 3 MB
- Stars: 167
- Watchers: 15
- Forks: 62
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chainer-char-rnn
karpathy's [char-rnn](https://github.com/karpathy/char-rnn) implementation by [Chainer](https://github.com/pfnet/chainer)## Requirement
- [Chainer](https://github.com/pfnet/chainer)
```
$ pip install chainer
```## Train
Start training the model using `train.py`, for example```
$ python train.py
```The `--data_dir` flag specifies the dataset to use. By default it is set to `data/tinyshakespeare` which consists of a subset of works of Shakespeare.
**Your own data**: If you'd like to use your own data create a single file `input.txt` and place it into a folder in `data/`. For example, `data/some_folder/input.txt`.
## Sampling
Given a checkpoint file (such as those written to cv) we can generate new text. For example:
```
$ python sample.py \
--vocabulary data/tinyshakespeare/vocab.bin \
--model cv/some_checkpoint.chainermodel \
--primetext some_text --gpu -1
```
## References
- Original implementation: https://github.com/karpathy/char-rnn
- Blog post: http://karpathy.github.io/2015/05/21/rnn-effectiveness/