mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-03 00:32:39 +02:00
slightly improved computation for var_Gauss method
This commit is contained in:
parent
d28483807d
commit
56acbf4e0a
1 changed files with 4 additions and 1 deletions
|
|
@ -47,7 +47,10 @@ class VarGauss(LatentFunctionInference):
|
|||
dL_dthetaL = np.array([])
|
||||
dF_da = np.dot(K, dF_dm)
|
||||
SigmaB = Sigma*self.beta
|
||||
dF_db = -np.diag(Sigma.dot(np.diag(dF_dv.flatten())).dot(SigmaB))*2
|
||||
#dF_db_ = -np.diag(Sigma.dot(np.diag(dF_dv.flatten())).dot(SigmaB))*2
|
||||
dF_db = -2*np.sum(Sigma**2 * (dF_dv * self.beta), 0)
|
||||
#assert np.allclose(dF_db, dF_db_)
|
||||
|
||||
KL = 0.5*(Alogdet + np.trace(Ai) - num_data + np.sum(m*self.alpha))
|
||||
dKL_da = m
|
||||
A_A2 = Ai - Ai.dot(Ai)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue