torchsig.utils.writer.default_collate_fn

torchsig.utils.writer.default_collate_fn(batch)[source]

Collates a batch by zipping its elements together. Note: not pickle-safe for complex nested structures, but works for typical (data, label) batches.

Parameters:

batch (tuple) – A batch from the dataloader.

Returns:

A tuple of zipped elements, where each element corresponds to a single batch item.

Return type:

tuple