def evaluation(dataloader, model):
total, correct = 0, 0
for data in dataloader:
inputs, labels = data
inputs, labels = inputs.to(device), labels.to(device)
outputs = model(inputs)
_, pred = torch.max(outputs.data, 1)
total += labels.size(0)
y_score.append(outputs.cpu())
y.append(labels.cpu().numpy())
correct += (pred == labels).sum().item()
return 100 * correct / total