Solved by mariosasko in post #4 
              
              
                The simplest solution to that is to define the collate_fn like this: 
def collate_fn(batch):
    return tuple(zip(*batch))

And this is the for loop: 
for image_batch, bbox_batch in dataloader: 
    ...

Then, inside the loop you can stack the images before passing them to the model, etc. 
If you ne…