Module 11c - Batches with sequences in Pytorch

Table of Contents

Pytorch tutorial on batch for sequences

0:00 Presentation
2:15 Step 1: Construct Vocabulary
2:50 Step 2: Load indexed data (list of instances, where each instance is list of character indices)
3:45 Step 3: Make Model
4:50 Step 4: Pad instances with 0s till max length sequence
5:47 Step 5: Sort instances by sequence length in descending order
6:55 Step 6: Embed the instances
9:10 Step 7: Call pack_padded_sequence with embeded instances and sequence lengths
12:41 Step 8: Forward with LSTM
14:38 Step 9: Call unpack_padded_sequences if required / or just pick last hidden vector