am getting this error :
IndexError: index 28 is out of bounds for dimension 0 with size 28
when i run on test_loader
for data, target in test_loader:
data, target = data.cuda(), target.cuda()
output = model(data)

loss = criterion(output, target)

test_loss += loss.item()

_, pred = torch.max(output, 1)    

correct_tensor = pred.eq(target.data.view_as(pred))
correct = np.squeeze(correct_tensor.cpu().numpy())

for i in range(64):
    label = target.data[i]
    class_correct[label] += correct[i].item()
    class_total[label] += 1

the error occur at label = target.data[i] how to solve it.