diff --git a/GPy/core/model.py b/GPy/core/model.py index 0fdf4800..3863ac42 100644 --- a/GPy/core/model.py +++ b/GPy/core/model.py @@ -291,7 +291,7 @@ class Model(Parameterized): # just check the global ratio dx = np.zeros(x.shape) dx[transformed_index] = step * (np.sign(np.random.uniform(-1, 1, transformed_index.size)) if transformed_index.size != 2 else 1.) - + # evaulate around the point x f1 = self._objective(x + dx) f2 = self._objective(x - dx) @@ -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 diff --git a/GPy/core/sparse_gp_mpi.py b/GPy/core/sparse_gp_mpi.py index f0465f38..73a37862 100644 --- a/GPy/core/sparse_gp_mpi.py +++ b/GPy/core/sparse_gp_mpi.py @@ -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 diff --git a/GPy/models/ss_gplvm.py b/GPy/models/ss_gplvm.py index 7913b605..4ea4f297 100644 --- a/GPy/models/ss_gplvm.py +++ b/GPy/models/ss_gplvm.py @@ -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