netmap.model.nbautoencoder.NegativeBinomialLoss¶
- class netmap.model.nbautoencoder.NegativeBinomialLoss(*args: Any, **kwargs: Any)[source]¶
Bases:
Module- forward(y_true, y_pred, theta)[source]¶
Compute the Negative Binomial negative log-likelihood loss.
- Parameters:
y_true (torch.Tensor) – Ground truth counts (non-negative integers).
y_pred (torch.Tensor) – Predicted mean values (mu).
theta (torch.Tensor) – Dispersion parameter.
- Returns:
Mean negative log-likelihood of the NB distribution.
- Return type: