stanis-morozov:

return torch.stack(batch, 0, out=None)


Recently, I got stuck with Batch Sampler and collate_fn for vairable input sizes.
I got a way around by transforming the input (padding) before Dataloader and directly use batch_size