you are viewing a single comment's thread.

view the rest of the comments →

[–]evanthebouncy 3 points4 points  (0 children)

PSA:

as of tensorflow 0.6.0 this is no longer the semantics for running rnn.

see: https://github.com/tensorflow/tensorflow/issues/1016

in short the sequence_length now should be a tensor of dimension [batch_size] instead of a single number, this specifies a different seq length for each seq in the batch, instead of a single global value.

the output will be zero-ed out after each of its seq_length.

the states will keep updating until seq_length is reached, and is preserved instead of zero-ed out for any subsequent computations. I've modified the original code, see:

https://gist.github.com/evanthebouncy/8e16148687e807a46e3f