gpytorch
gpytorch copied to clipboard
add combine_terms option to exact MLL
I've found that logging the inv_quad terms and logdet terms separately (rather than just the train loss) to be very helpful for debugging. Right now classes like VariationalELBO
have a combine_terms
option that allow the user to sum the terms after the MLL call. This is a nice feature, since otherwise you essentially have to pay for an extra training step just to log the terms separately.
In this PR I've demonstrated how we could go about adding this option to the subclasses of MarginalLogLikelihood
, starting with the Gaussian likelihood case. There are a few unit tests that aren't passing yet, but I wanted to check and see if this feature would be approved before fixing it up.
@jacobrgardner @gpleiss any thoughts?
Yeah, this would be awesome to add!
@gpleiss how does everything look?
Looks like the failing unit test was flaky.