gaussian_ll

behavenet.fitting.losses.gaussian_ll(y_pred, y_mean, masks=None, std=1)[source]

Compute multivariate Gaussian log-likelihood with a fixed diagonal noise covariance matrix.

Parameters:
  • y_pred (torch.Tensor) – predicted data of shape (n_frames, …)

  • y_mean (torch.Tensor) – true data of shape (n_frames, …)

  • masks (torch.Tensor, optional) – binary mask that is the same size as y_pred and y_true; by placing 0 entries in the mask, the corresponding dimensions will not contribute to the loss term, and will therefore not contribute to parameter updates

  • std (float, optional) – fixed standard deviation for all dimensions in the multivariate Gaussian

Returns:

Gaussian log-likelihood summed across dims, averaged across batch

Return type:

torch.Tensor