Support for bidirectional_dynamic_rnn? - PyTorch Forums
https://discuss.pytorch.org/t/support-for-bidirectional-dynamic-rnn/147230.03.2017 · In PyTorch, a dynamic RNN over a custom cell is a for loop. That is, the following two code snippets do the same thing (the first one is a simplified version of the implementation of tf.dynamic_rnn). #TensorFlow (should be run once, during `__init__`) cond = lambda i, h: i < tf.shape(words)[0] cell = lambda i, h: rnn_unit(words[i], h) i = 0 _, h = tf.while_loop(cond, cell, (i, …