Could you describe your use case and why you need to create a custom DataLoader?
Usually you would create a custom Dataset (as described here 41) and, if necessary, write a custom collate_fn for the DataLoader, but wouldn’t need to manipulate the DataLoader directly.