espnet.lm.pytorch_backend.lm.concat_examples
Less than 1 minute
espnet.lm.pytorch_backend.lm.concat_examples
espnet.lm.pytorch_backend.lm.concat_examples(batch, device=None, padding=None)
Concat examples in minibatch.
- Parameters:
- batch (np.ndarray) – The batch to concatenate
- device (int) – The device to send to
- padding (Tuple *[*int *,*int ]) – The padding to use
- Returns: (inputs, targets)
:rtype (torch.Tensor, torch.Tensor)