collate_fn#

(s3prl.dataio.collate_fn)

default_collate_fn#

s3prl.dataio.collate_fn.default_collate_fn(samples, padding_value: int = 0)[source][source]#

Each item in DynamicItemDataset is a dict This function pad (or transform into numpy list) a batch of dict

Parameters:

samples (List[dict]) –

Suppose each Container is in

wav: a single waveform
label: a single string

Returns:

dict

wav: padded waveforms
label: np.array([a list of string labels])