Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sigma_noise gradient propagation in BaseLaplace.log_likelihood #212

Merged
merged 1 commit into from
Jul 16, 2024

Commits on Jul 16, 2024

  1. Fix sigma_noise gradient propagation in BaseLaplace.log_likelihood

    Commit 1eea27c introduced type hints in baselaplace.py but broke the
    gradient flow through `BaseLaplace.log_likelihood` since `sigma_noise`
    loses its gradient via `torch.tensor(...)`. This is fixed by using
    `torch.as_tensor(...)` as it converts floats but preserves the gradient.
    kourbou committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    9d7b2f5 View commit details
    Browse the repository at this point in the history