Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between LSTMBlockCell and BasicLSTMCell in Tensorflow contrib.rnn

Tags:

tensorflow

I know that LSTMBlockCell is efficient to initialize at the begining of training. The official API guides of Tensorflow said that LSTMBlockCell add a forgot_bias. Can I just replace the BasicLSTMCell with LSTMBlockCell in my RNN models? And there are too many stuffs in tf.contrib.rnn, I feel that those APIs are really inconsistent.

like image 674
YiMx Avatar asked May 12 '17 03:05

YiMx


1 Answers

The main difference between LSTMBlockCell and BasicLSTMCell is that BasicLSTMCell is implemented in terms of primitive TensorFlow ops, so it's useful code to copy and edit if you want to play with your LSTM architecture. LSTMBlockCell, on the other hand, uses a fused kernel which allows for much better performance.

like image 193
Alexandre Passos Avatar answered Nov 15 '22 06:11

Alexandre Passos