bbc4e3ee65ab504be761e3b5487ce4ccdd589da0,GPflow/svgp.py,SVGP,build_likelihood,#SVGP#,46
Before Change
def f(w):
R = tf.triu(w)
return -tf.reduce_sum(tf.log(tf.user_ops.get_diag(R))) + 0.5*tf.reduce_sum(tf.square(R))
KL += theano.scan(f, self.q_sqrt.swapaxes(0,2))[0].sum()
fmean, fvar = conditionals.gaussian_gp_predict_whitened(self.X, self.Z, self.kern, self.q_mu, self.q_sqrt)
else:
L = tf.cholesky(self.kern.K(self.Z) + eye(self.num_inducing) * 1e-4)
alpha = tf.user_ops.triangular_solve(L, self.q_mu, "lower")
After Change
else:
//here we loop through all the independent columns, extracting the triangular part.
for d in range(self.num_latent):
L = tf.user_ops.triangle(self.q_sqrt[d,:,:] , "lower")
KL += -tf.reduce_sum(tf.log(tf.user_ops.get_diag(L))) + 0.5*tf.reduce_sum(tf.square(L))
fmean, fvar = conditionals.gaussian_gp_predict_whitened(self.X, self.Z, self.kern, self.q_mu, self.q_sqrt)
else:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: GPflow/GPflow
Commit Name: bbc4e3ee65ab504be761e3b5487ce4ccdd589da0
Time: 2016-01-18
Author: james.hensman@gmail.com
File Name: GPflow/svgp.py
Class Name: SVGP
Method Name: build_likelihood
Project Name: NifTK/NiftyNet
Commit Name: a59350bf9cc20c9e02e2397d31bbf87848db8f9e
Time: 2017-10-19
Author: carole.sudre.12@ucl.ac.uk
File Name: niftynet/evaluation/region_properties.py
Class Name: RegionProperties
Method Name: glcm
Project Name: GPflow/GPflow
Commit Name: a9273fb766562261b2ccedb635c71363fb10f06c
Time: 2016-01-18
Author: james.hensman@gmail.com
File Name: GPflow/svgp.py
Class Name: SVGP
Method Name: build_likelihood