Custom Collate Function
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.
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.