import torch


def squared_deltaE(lab1, lab2):
    """Squared Delta E (CIE 1976).

    lab1: Bx3xHxW
    lab2: Bx3xHxW
    return: Bx1xHxW

    """
    return torch.sum((lab1 - lab2) ** 2, 1, keepdim=True)