Expand description
Uilities for dealing with batches, such as shuffling and sorting batches
Functionsยง
- filter_
by_ length - Filters lists by a max length and returns the ones under the max
- pad_
batch - Pad all sequences to the length of the longest sequence
- pad_
mask - Create a pad mask based on the values in the batch (batch shape: batch size, seq len)
- shuffle_
lists - Shuffles multiple lists of the same length in the same ways
- sort_
lists_ by_ length - Sort lists by length. Uses the lengths of the elements in the first list passed in