How to speedup rnn training speed of tensorflow?

后端 未结 2 1767
难免孤独
难免孤独 2021-02-09 04:52

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:

2条回答
  •  一生所求
    2021-02-09 05:19

    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

提交回复
热议问题