take the first in dataloader pytorch code example Example: take the first in dataloader pytorch inputs, classes = next(iter(dataloader))