Based on the error message I would guess that self.targets[item, :] raises the error where item is 608. Did you try to index your Dataset (not DataLoader) with this index and are you seeing the same error? If so, I would guess that the returned length of the Dataset via __len__ is wrong and yields an invalid length.