Hello,
I am a newbies for ML. I started training MNIST dataset. I can send my model to GPU by using this code.
network.to(device) # Returned… true
When I sent the dataset to GPU by this testing code.
for batch_idx, (data, target) in enumerate(train_loader):
data.to(device)
target.to(device)
if batch_idx == 100:
print(data.device)
print(type(data))
pass
#Returned … cpu
#Returned … <class ‘torch.Tensor’>
Question: Why does “data.to(device)” still be on CPU?
Note: I use RTX30xx