I’m using a custom Dataset where the path to the images is created from a Pandas DataFrame. Out of curiosity I added a print(idx) to the __getitem__ function and I noticed that it’s called twice (it prints two different indices) if I use 1 worker. If I use multiple workers, it’s called even more times. The batch size is 1, though.
Am I missing something? Shouldn’t I get just one image? Moreover, it returns just one image, independently of the number of workers (as it should be).