mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-11 13:02:38 +02:00
remove the print message in model.checkgrad
This commit is contained in:
parent
808cfb0501
commit
e46f3b342e
3 changed files with 4 additions and 5 deletions
|
|
@ -303,7 +303,6 @@ class Model(Parameterized):
|
|||
denominator = (2 * np.dot(dx, gradient))
|
||||
global_ratio = (f1 - f2) / np.where(denominator == 0., 1e-32, denominator)
|
||||
global_diff = np.abs(f1 - f2) < tolerance and np.allclose(gradient, 0, atol=tolerance)
|
||||
print self.mpi_comm.rank,global_ratio,global_diff
|
||||
if global_ratio is np.nan:
|
||||
global_ratio = 0
|
||||
return np.abs(1. - global_ratio) < tolerance or global_diff
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class SparseGP_MPI(SparseGP):
|
|||
self.add_parameter(self.X, index=0)
|
||||
if variational_prior is not None:
|
||||
self.add_parameter(variational_prior)
|
||||
self.X.fix()
|
||||
# self.X.fix()
|
||||
|
||||
self.mpi_comm = mpi_comm
|
||||
# Manage the data (Y) division
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ class SSGPLVM(SparseGP_MPI):
|
|||
X = SpikeAndSlabPosterior(X, X_variance, gamma)
|
||||
|
||||
super(SSGPLVM,self).__init__(X, Y, Z, kernel, likelihood, variational_prior=self.variational_prior, inference_method=inference_method, name=name, mpi_comm=mpi_comm, normalizer=normalizer, **kwargs)
|
||||
self.X.unfix()
|
||||
self.X.variance.constrain_positive()
|
||||
# self.X.unfix()
|
||||
# self.X.variance.constrain_positive()
|
||||
|
||||
if self.group_spike:
|
||||
[self.X.gamma[:,i].tie('tieGamma'+str(i)) for i in xrange(self.X.gamma.shape[1])] # Tie columns together
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue