tree: 2b26f410883f98e4d1c3ac3b0902eddfa32f4d4a [path history] [tgz]
  1. README.md
  2. sample.py
  3. train.py
examples/rnn/README.md

Train Char-RNN over plain text

Recurrent neural networks (RNN) are widely used for modelling sequential data, e.g., natural language sentences. This example describes how to implement a RNN application (or model) using SINGA's RNN layers. We will use the char-rnn model as an example, which trains over sentences or source code, with each character as an input unit. Particularly, we will train a RNN over Linux kernel source code.

Instructions

  • Prepare the dataset. Download the kernel source code. Other plain text files can also be used.

  • Start the training,

      python train.py linux_input.txt
    

    Some hyper-parameters could be set through command line,

      python train.py -h