def batch_collate_fn(self, batch):
            """ collate sequences of different lengths into batch of size BxSxE, where S is max seqlen """
            seqs, labels = zip(*batch)
            seqs = nn.utils.rnn.pad_sequence(seqs, batch_first=True, padding_value=self.padding_value)
            labels = torch.tensor(labels, dtype=float)
            return seqs, labels
 collate sequences of different lengths into batch of size BxSxE, where S is max seqlen 
training/data_efficiency/variable_batch_size_and_lr/variable_batch_size_and_lr_example.py