import torch


def mae(predictions, actuals):
    """
        computes mean absolute error
            - predictions: predictions computed from call to model.forward(...) (Tensor)
            - actuals: actual values (labels) (Tensor)
        @returns:
            computed mae = sum(abs(predictions - actuals)) / actuals.size(0)
    """
    diff = actuals - predictions
    mae_err = torch.mean(torch.abs(diff))
    return mae_err.detach().numpy()