nnsvs.train_util.collate_fn_default

nnsvs.train_util.collate_fn_default(batch, reduction_factor=1, stream_sizes=None, streams=None)[source]

Create batch

Parameters:
  • batch (tuple) – List of tuples - x[0] (ndarray,int) : list of (T, D_in) - x[1] (ndarray,int) : list of (T, D_out)

  • reduction_factor (int) – Reduction factor.

Returns:

Tuple of batch
  • x (FloatTensor) : Network inputs (B, max(T), D_in)

  • y (FloatTensor) : Network targets (B, max(T), D_out)

  • lengths (LongTensor): Input lengths

Return type:

tuple