From 4c963d1a6764f0627d4696869fe43c546d3974c5 Mon Sep 17 00:00:00 2001 From: Nicolo Fusi Date: Thu, 31 Jan 2013 14:33:34 +0000 Subject: [PATCH] fixed bug in SGD --- GPy/inference/SGD.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPy/inference/SGD.py b/GPy/inference/SGD.py index 25f9feae..5539952f 100644 --- a/GPy/inference/SGD.py +++ b/GPy/inference/SGD.py @@ -159,6 +159,7 @@ class opt_SGD(Optimizer): missing_data = self.check_for_missing(self.model.Y) self.model.Youter = None # this is probably not very efficient self.model.YYT = None + step = np.zeros_like(self.model._get_params()) for it in range(self.iterations): if it == 0 or self.self_paced is False: @@ -168,7 +169,6 @@ class opt_SGD(Optimizer): b = len(features)/self.batch_size features = [features[i::b] for i in range(b)] - step = np.zeros_like(self.model._get_params()) LL = [] count = 0