C1_M3 - Robust dataset

I think the code from robust dataset might create an infinite loop if there is a lot of corrupted images. or create an imbalanced dataset with duplicated items.

what do you think?

next_idx = (idx + 1) % len(self)
return self.getitem(next_idx)

You have a good point — if this were going into production, that could be an issue.
However, in the context of the lab, the setup is limited and controlled, so that situation can’t really occur. That’s why we opted for a simple version.