# HG changeset patch # User Xavier Glorot # Date 1257800220 18000 # Node ID 0cfbaf0c598d213dffde9ee4caef61c3504eabde # Parent 553bf0861fb5bd8a67ff1e94c67c01d38dedcd8a sum change to mean for logistic regression cost over mini-batches diff -r 553bf0861fb5 -r 0cfbaf0c598d pylearn/algorithms/logistic_regression.py --- a/pylearn/algorithms/logistic_regression.py Mon Nov 09 14:41:00 2009 -0500 +++ b/pylearn/algorithms/logistic_regression.py Mon Nov 09 15:57:00 2009 -0500 @@ -101,7 +101,7 @@ nnet.crossentropy_softmax_max_and_argmax_1hot( self.linear_output, self.target) - self.unregularized_cost = T.sum(self._xent) + self.unregularized_cost = T.mean(self._xent) self.l1_cost = self.l1 * T.sum(abs(self.w)) self.l2_cost = self.l2 * T.sum(self.w**2) self.regularized_cost = self.unregularized_cost + self.l1_cost + self.l2_cost