Hello, I’m loading the MNIST dataset using torchvision.
test_iter = torch.utils.data.DataLoader(
    datasets.MNIST('.data/mnist', train=False,
                       transform=transforms.Compose([
                           transforms.ToTensor(),
                           transforms.Normalize((0.1307,), (0.3081,))
                       ])),
        batch_size=batch_size, shuffle=True, num_workers=1, pin_memory=True)

This code is returning tensors on CPU. Is there a way to load the batches on the GPU from the DataLoader? For instance, in torchtext there is a device option in the loaders’ signature.