import torch


def evaluate_performance_batch(model,batch, criterion, device = 'cuda'):
    """Evaluate performance for a single batch"""
    with torch.no_grad():
        images, labels = tuple(map(lambda x: x.to(device), batch))
        predictions = model.forward(images)
        _, predict = torch.max(predictions, 1)
        
        correct = (predict == labels).sum().item()
        total  = len(labels)
        
    return correct, total