# tensorplay.utils.data.default_collate Source: https://www.tensorplay.cn/docs/generated/tensorplay.utils.data.default_collate.html ```python tensorplay.utils.data.default_collate(batch) ``` Take in a batch of data and put the elements within the batch into a tensor with an additional outer dimension - batch size. The exact output type can be a [tensorplay.Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor), a Sequence of [tensorplay.Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor), a Collection of [tensorplay.Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor), or left unchanged, depending on the input type. This is used as the default function for collation when batch_size or batch_sampler is defined in [DataLoader](/docs/generated/tensorplay.utils.data.DataLoader.html#tensorplay.utils.data.DataLoader). Parameters: batch – a single batch to be collated