Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
The current RNN layer can accept samples with different length within one mini-batch, however, it assumes that the longest samples of each mini-batch is the same, i.e. seq_length is fixed.
To make it more flexible, this ticket will extend the RNN layer to accept mini-batches with different longest samples.
In particular, we will set two variables, max_length_ and seq_length_, where the first one is for the max seq length over all mini-batches, and the seq_length_ is the effective seq length for the current mini-batch, which is updated based on the input data for every iteration (mini-batch). The max_length_ is updated when max_length_ < seq_length_.