aleximmer / Laplace

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

Fix device and dtype of `block_diag` used for `Kron.to_matrix()` #117

Closed runame closed 1 year ago

runame commented 1 year ago

Before this fix calling to_matrix() on an instance of the Kron class did not preserve the dtype and device, so even when everything is computed on GPU the returned matrix used to be on CPU, which is unexpected behavior.