资源算法chainer-char-rnn

chainer-char-rnn

2019-09-17 | |  72 |   0 |   0

chainer-char-rnn

karpathy's char-rnn implementation by Chainer

Requirement

$ 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/

            

上一篇:Skip-Thought Vectors

下一篇:WideResNets

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...