Closed cookbook-ms closed 9 months ago
@cookbook-ms the issue is that your forward
function doesn't accept a diag=True
keyword argument, which is necessary to obtain variance estimates. See the RBF or the LinearKernel implmentations for an example.
I realize that the custom tutorial documentation also does not include this option. This option may become obsolete with #2342 , so I'm not going to suggest fixing the tutorial at this moment.
Please refer to how LinearKernel implements this https://docs.gpytorch.ai/en/stable/_modules/gpytorch/kernels/linear_kernel.html#LinearKernel
🐛 Bug
I have a self defined kernel: basically a exponential kernel but operated in the eigenspace.
To reproduce
Code snippet to reproduce
My covariance module:
When computing the variance and MSLL, it has the error
Stack trace/error message
Expected Behavior
I expect to get the variance or MLSS from the trained model and likelihood.
System information
Please complete the following information:
Additional context
Add any other context about the problem here. I noticed similar type of issues in other issues too. While I tried to figure out the reason, I believe it is because I used
K1 = self.eigvecs @ self.eigvecs.T
regardless of if there is a diagonal matrix inbetween