Batch parameter is implicit in the Dataloader function.
You just have to pass the collate function name to collate_fn Dataloader parameter.
Here’s an example:
loader_collate = DataLoader(
    dataset, shuffle=True, batch_size=5, collate_fn=collate_fn)