<p dir="auto">The <code class="notranslate">tf.train.batch()</code> function had a nice <code class="notranslate">dynamic_pad</code> flag:<br>
<a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/training/input.py#L567">https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/training/input.py#L567</a><br>
Is there anything holding us batch from implementing it in <code class="notranslate">tf.train.shuffle_batch()</code>:<br>
<a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/training/input.py#L778">https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/training/input.py#L778</a></p>
<p dir="auto">tf.train.batch is the only one can handle variable-length sequence, but it does not have shuffling option.<br>
For RNN training, shuffling is needed.</p>