aleximmer / Laplace

Laplace approximations for Deep Learning.
https://aleximmer.github.io/Laplace
MIT License
436 stars 63 forks source link

Replacing `torch.einsum()` with `opt_einsum` #125

Closed Heatdh closed 1 year ago

Heatdh commented 1 year ago

Changes: Previously, the torch.einsum() was causing memory issues, leading to out-of-memory errors during the call of diag function. Replacing it with the equivalent opt_einsum implementation solved the issue and alleviated memory consumption during runtime.