-
Notifications
You must be signed in to change notification settings - Fork 76
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
Are customized loss functions/layers supported? #119
Comments
Hi, Thanks for your interest. Unfortunately, only basic nn.Modules can be supported since this allows to compute Hessian approximations (for example see the necessary extensions in ASDL). The same applies to losses. However, in some cases it is not that complicated to extend the corresponding backend so if you have a specific use-case, we can try to give suggestions how to get it done with the help of the library if possible. |
The For custom loss functions, the requirement is that they correspond to a log-likelihood. Then we need to know how to sample or compute the 2nd derivative w.r.t. network's output. E.g. here Laplace/laplace/curvature/curvature.py Lines 239 to 257 in 7541c9b
We plan to support more likelihood, e.g. BCE (#130), after milestone 0.2. |
Hi!
Thanks for the great work. I'm trying to use the Laplace approximation in my work, but your package only supports MSE and CE, and the corresponding layers only support the nn.Module class. Is there any method to use your package with customized loss functions/layers?
Best
The text was updated successfully, but these errors were encountered: