Skip to content

Where are the loss functions/Linear Algebra Routines actually implemented? #2215

Answered by Balandat
kevinli1324 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, thanks for your interest!

  1. Yes, the core linear algebra routines are all implemented in the linear_operator library. torch.solve(K, y) will automatically dispatch to the solve method that is implemented on the particular LinearOperator class of the tensor K (https://github.com/cornellius-gp/linear_operator/blob/main/linear_operator/operators/_linear_operator.py#L2162 registers the function on the base class). So if there is a simplification (e.g. the LinearOperator is diagonal) then this may not use linear CG but some other method.
  2. These are there in the MLL module. E.g. for an exact GP the MLL is evaluated in these lines: https://github.com/cornellius-gp/gpytorch/blob/master/gpytorch…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gpleiss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants