import torch


def mean_absoulte_error(original_img, resoluted_img):
    """
    Computing the mean absolute error between original and resoluted images

    Args:
    -----
    original_img: batch of torch Tensors
        batch containing the input images
    resoluted_img: batch of torch Tensors
        batch containing the tensors at the output of the network

    Returns:
    --------
    mae: float
        mean absolute error of the image
    """

    subs = original_img - resoluted_img
    vals = torch.abs(subs)
    mae = torch.mean(vals)

    return mae