ML Katas

Custom Collate Function

medium (<30 mins) pytorch dataloader sequences collate
this month by E

Write a custom collate_fn for DataLoader that pads variable-length sequences with zeros. Use torch.nn.utils.rnn.pad_sequence.

Test by batching random-length tensors.