Now base tensorflow-char-rnn I start a word-rnn project to predict the next word. But I found that speed is too slow in my train data set. Here is my training details:
As you mentionned batch_size is really important to tune, it can lead to impressive speedup but check that your perplexity keeps relevant.
Monitoring your GPU activity can you give you hints about potential I/O bottleneck.
Most importantly, using sampled softmax instead of regular softmax is way faster. This would require you to use a [config.vocab_size, config.hidden_size]
weight matrix instead of you [config.hidden_size, config.vocab_size]
. This is definitely the way to go to my point of view.
Hope this helps.
pltrdy
One other possible way you can speed up training, and the possible reason for your lack of utilisation of the GPU, is you are using placeholders. You should be using queues, if using Tensorflow < 1.2, and the tf.contrib.data module otherwise.
https://www.tensorflow.org/programmers_guide/threading_and_queues