aleximmer / Laplace

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

Add support for cross entropy loss inputs with multiple leading dimensions #132

Closed runame closed 11 months ago

runame commented 11 months ago

Needed for, e.g., language data with multiple leading dimensions (batch_size, n_tokens, ...). We assume that the last dimension of the model outputs is of size n_outputs (consistent with ASDL); hence, we can flatten all other dimensions into the batch dimension.