From 68a8c3a691bd4dfdad268c3cedc3d3a72a5988ab Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Mon, 31 Mar 2014 14:09:47 +0100 Subject: [PATCH] gradient can be zero and two parameter cancellation is caught --- GPy/core/model.py | 1 - 1 file changed, 1 deletion(-) diff --git a/GPy/core/model.py b/GPy/core/model.py index 1a539f9f..38e8d4cf 100644 --- a/GPy/core/model.py +++ b/GPy/core/model.py @@ -294,7 +294,6 @@ class Model(Parameterized): global_diff = np.abs(f1 - f2) < tolerance and np.allclose(gradient, 0, atol=tolerance) if global_ratio is np.nan: global_ratio = 0 - print global_ratio, global_diff, np.allclose(gradient, 0, atol=tolerance), np.abs(1. - global_ratio), np.abs(f1-f2).sum() + np.abs((2 * np.dot(dx, gradient))).sum() return np.abs(1. - global_ratio) < tolerance or global_diff else: # check the gradient of each parameter individually, and do some pretty printing