That's an implementation detail of the DataLoader which could not be correct for custom dataloaders (ffcv, nvidia dali, poptorch's, ...)    For the same reason, getting the class name dynamically would be better