Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
When iterating over a PyTorch DataLoader, what is its main function during network training?
DataLoader
To keep track of the computational graph during the forward pass to allow automatic differentiation.
To compute the loss function given the network logits and the true labels.
To define the neural network architecture by stacking layers sequentially.
To efficiently collect data at random indices from a Dataset to form mini-batches on-the-fly and transport it to memory.
To download standard image datasets from the torchvision package directly to the GPU.
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!