:py:mod:`ggt.losses.aleatoric_cov_loss` ======================================= .. py:module:: ggt.losses.aleatoric_cov_loss Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: ggt.losses.aleatoric_cov_loss.aleatoric_cov_loss .. py:function:: aleatoric_cov_loss(outputs, targets, num_var=3, average=True) Computes the Aleatoric Loss while including the full covariance matrix of the outputs. If you are predicting for n output variables, then the number of output neuros required for this loss is (3n + n^2)/2. Args: outputs: (tensor) - predicted outputs from the model targets: (tensor) - ground truth labels size_average: (bool) - if True, the losses are averaged over all elements of the batch Returns: aleatoric_cov_loss: (tensor) - aleatoric loss Formula: loss = 0.5 * [Y - Y_hat].T * cov_mat_inv * [Y - Y_hat] + 0.5 * log(det(cov_mat))