DataLoader for both input and output

Hi, I am trying to generate batches for both input and output data with shuffling using DataLoader. I wonder if the only way to do that is to concatenate input and output and feed it into DataLoader, and then split it to get input/output batch afterwards, or there are other ways to do it?

Thank you!

You don’t need to concatenate them. You can simply have more than one outputs in the dataset __getitem__, data loader returns those in batches.

1 Like