changeset 643:5f9ffefa9ca8 sequencelabelling 20090130-rerun

pylearn/algorithms/logistic_regression.py: Added back in unsupervised softmax computation.
author Joseph Turian <turian@iro.umontreal.ca>
date Fri, 30 Jan 2009 16:38:46 -0500
parents 88603b2ac8f9
children 48411bd1f5b7
files pylearn/algorithms/logistic_regression.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/algorithms/logistic_regression.py	Fri Jan 30 16:38:02 2009 -0500
+++ b/pylearn/algorithms/logistic_regression.py	Fri Jan 30 16:38:46 2009 -0500
@@ -68,6 +68,10 @@
         self.regularized_cost = self.unregularized_cost + self.l1_cost + self.l2_cost
         self._loss_zero_one = T.mean(T.neq(self.argmax, self.target))
 
+        # Softmax being computed directly.
+	# TODO: Move somewhere else, more clean.
+        self.softmax_unsupervised = nnet.softmax(self.linear_output)
+
         # METHODS
         if 0: #TODO: PENDING THE BETTER IMPLEMENTATION ABOVE
             self.predict = module.Method([self.input], self.argmax)