AFAIK,  there are many ways to achieve your goal. Here are two examples.
dloader = DataLoader(dset, batch_size=batch_size, drop_last=True, shuffle=True)
loader = iter(dloader)
while True:
    try:
        img, label = loader.next()
    except StopIteration:
        loader = iter(dloader)
        img, label = loader.next()

   # ...

and
dloader = DataLoader(dset, batch_size=batch_size, drop_last=True, shuffle=True)
epoch = 3
for e in range(epoch):
   for img, label in dloader:
      # ...