F2 = GPflow.likelihoods.Likelihood.variational_expectations(l, self.Fmu, self.Fvar, self.Y)
//compile and run the functions:
if len(x_data):
F1 = theano.function([x], F1)(x_data)
F2 = theano.function([x], F2)(x_data)
else:
F1 = theano.function([], F1)()
F2 = theano.function([], F2)()
After Change
F1 = l.variational_expectations(self.Fmu, self.Fvar, self.Y)
F2 = GPflow.likelihoods.Likelihood.variational_expectations(l, self.Fmu, self.Fvar, self.Y)
//compile and run the functions:
F1 = tf.Session().run(F1, feed_dict={x: x_data})
F2 = tf.Session().run(F2, feed_dict={x: x_data})
self.failUnless(np.allclose(F1, F2, 1e-6, 1e-6))
def test_pred_density(self):