From fac5ed5d4f0ae24d274e0956f4b7d2d6d09d2841 Mon Sep 17 00:00:00 2001 From: searchivairus Date: Tue, 23 May 2017 13:23:30 -0400 Subject: [PATCH] Preventing a crash for LSML in a verbose mode --- metric_learn/lsml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metric_learn/lsml.py b/metric_learn/lsml.py index f329fe5e..41a00c49 100644 --- a/metric_learn/lsml.py +++ b/metric_learn/lsml.py @@ -69,7 +69,7 @@ def fit(self, X, constraints, weights=None): """ self._prepare_inputs(X, constraints, weights) prior_inv = scipy.linalg.inv(self.M_) - s_best = self._total_loss(self.M_, prior_inv) + l_best = s_best = self._total_loss(self.M_, prior_inv) step_sizes = np.logspace(-10, 0, 10) if self.verbose: print('initial loss', s_best)