import torch


def reconstruction_loss(x, x_hat, *args, **kwargs):
    """
    Returns the binary cross entropy loss

    Parameters
    ----------
    x : Tensor
        the autoencoder input tensor
    x_hat : Tensor
        the autoencoder output tensor

    Returns
    -------
    Tensor
        the (1,) loss tensor
    """

    return torch.nn.BCELoss()(x_hat, x)