def crop_mse(original, out, mask, mse):
    """Return mean squared error over cropped out error, 
    which is indicated by the mask.

    Args:
        original (torch.tensor): Original tensor which has not been cropped.
        out (torch.tensor): Prediction of a neural net.
        mask (torch.tensor): Tensor with cropped out part == 1, else == 0.
        mse (nn.MSELoss): Instantiated loss function.

    Returns:
        tensor: Calculated loss.
    """
    return mse(out * mask, original.cuda() * mask)