def _collate(self, batch):
if isinstance(batch[<NUM_LIT:0>], tuple):<EOL><INDENT>return [self._cuda(torch.Tensor(samples)) for samples in list(zip(*batch))]<EOL><DEDENT>else:<EOL><INDENT>return self._cuda(torch.Tensor(batch))<EOL><DEDENT>
Puts each data field into a tensor.

:param batch: The input data batch.
:type batch: list of features
:return: Preprocessed data.
:rtype: torch.Tensor or pair of torch.Tensor