In tensorflow, what is the difference between tf.nn.static_rnn
and tf.nn.dynamic_rnn
, and when to use them?
Both take a sequence_length
argument that adapts the computation to the actual length of the input; it is not as if static_rnn
is limited to fixed-size inputs, right?
dynamic_rnn
has the following extra arguments:
parallel_iterations
swap_memory
time_major
But I suppose these are only minor differences.
So what is the main difference between tf.nn.static_rnn
and tf.nn.dynamic_rnn
and when should we use one over the other?