changeset 739:6789c6c38e04

added a NLL method to the StackedDAAig
author Xavier Glorot <glorotxa@iro.umontreal.ca>
date Thu, 28 May 2009 12:06:33 -0400
parents 4c536c570957
children 7ab4bc96cb12
files pylearn/algorithms/sandbox/DAA_inputs_groups.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/algorithms/sandbox/DAA_inputs_groups.py	Wed May 27 23:15:00 2009 -0400
+++ b/pylearn/algorithms/sandbox/DAA_inputs_groups.py	Thu May 28 12:06:33 2009 -0400
@@ -31,7 +31,7 @@
     return theano.tensor.nnet.sigmoid(x)
 
 def tanh_act(x):
-    return theano.tensor.tanh(x)
+    return (theano.tensor.tanh((x-0.5)*2))/2.0+0.5
 
 def softsign_act(x):
     return theano.sandbox.softsign.softsign(x)
@@ -541,6 +541,7 @@
         if self.totalupdatebool:
             self.totalupdate[-1] = theano.Method(self.inputs[-1],self.totalcost[-1],total_grads)
         self.classify = theano.Method(self.inputs[-2],self.daaig[-1].argmax_standalone)
+        self.softmax = theano.Method(self.inputs[-1],self.daaig[-1]._xent)
         
         if self.debugmethod:
             self.compute_localcost[-1] = theano.Method(self.inputs[-1],self.localcost[-1])