You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my particular application, I am interested in optimizing a GP model which has a neural network as the mean function by using a MSE-based loss function. The posterior mean of the GP requires the computation of the inverse of the training covariance matrix. Since I do not optimize the kernel parameters (I manually fix them at the beginning of optimization), this matrix remains constant throughout optimization and so I would like to store it at the very beginning to save the cost of inverting it in each forward pass. How can I do it?
This is my attempt to do so in the mean_cache function, which is used in prediction:
As you can see, I created the attribute model.train_covar_inv where I aim to store the inverse of the covariance matrix in the first forward pass by using the inv_matmul method on a identity matrix. The reason for which I do it this way is because I did not see any method for computing the inverse solely.
However, I do not get the same results as when I use the original code:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all,
In my particular application, I am interested in optimizing a GP model which has a neural network as the mean function by using a MSE-based loss function. The posterior mean of the GP requires the computation of the inverse of the training covariance matrix. Since I do not optimize the kernel parameters (I manually fix them at the beginning of optimization), this matrix remains constant throughout optimization and so I would like to store it at the very beginning to save the cost of inverting it in each forward pass. How can I do it?
This is my attempt to do so in the mean_cache function, which is used in prediction:
As you can see, I created the attribute model.train_covar_inv where I aim to store the inverse of the covariance matrix in the first forward pass by using the inv_matmul method on a identity matrix. The reason for which I do it this way is because I did not see any method for computing the inverse solely.
However, I do not get the same results as when I use the original code:
I would like to know why this might be happening and if there's something that I'm missing.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions