for batch_i, (_, imgs, targets) in enumerate(dataloader):
        batches_done = len(dataloader) * epoch + batch_i

        imgs = Variable(imgs.to(device))
        targets = Variable(targets.to(device), requires_grad=False)

Question 1:
If using num working = 4, batch_size=8 for the dataloader, does it mean that at the same time I will have 32 data assigned to the GPU memory?
Question 2:
What is pin_memory in dataloader?