davidbau/dissect

Why this `batch` should be list?

Closed this issue · 2 comments

Hi,
Thank you for the awesome repo, very easy to use!
I want to understand why the batch is expected to be a list in the following line. When inspected, this batch is list of 2 items, first of which is the image tensor. I couldn't understand what the 2nd item was. And also this dataloader is used in 4 places. everywhere else it returns just the images but in this it returns images and the unknown 2nd item. I couldn't exactly pinpoint how is this happening or what is the exact difference in this dataloader. Could you please point me to the relevant code lines? It will help me get unblocked in a research project.

for batchnum, batch in enumerate(pbar(loader)):

Thanks!

I am using a custom dataset. Thank you, my data loader was not returning the label and just the image. It is fixed now :)