You could create an iterator = iter(dataloader) and then call data, target = next(iterator) inside your training loop, but you would meed to catch the StopIteration manually, so I would just stick to:
for data, target in dataloder:
    ...

I’ve just used this line of code to get a single sample to check the shape.