Skip to content

Commit

Permalink
added eps to nll est
Browse files Browse the repository at this point in the history
  • Loading branch information
niki-amini-naieni committed Nov 5, 2023
1 parent 74cf59e commit fc2e9f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nerf/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ def nll(truths, preds, vars):
log_pdf_vals = []
for px_ind in range(vars.shape[0]):
log_pdf_vals.append(
np.log(
-np.log(
multivariate_normal.pdf(truths[px_ind], mean=preds[px_ind], cov=np.diag(vars[px_ind]), allow_singular=False)
)
) + 1e-12
)
return np.mean(log_pdf_vals)

Expand Down

0 comments on commit fc2e9f9

Please sign in to comment.