diff --git a/CIFAR10_playground.py b/CIFAR10_playground.py index 4f01afa..b189ac3 100755 --- a/CIFAR10_playground.py +++ b/CIFAR10_playground.py @@ -260,6 +260,7 @@ for epoch in range(n_epochs): correct = 0 total = 0 for idx,(img,label) in tqdm(enumerate(test_loader)): + img, label=img.to(device), label.to(device) output = model(img) loss = criterion(output, label) valid_loss += loss.item() * img.shape[0]