# HG changeset patch # User Xavier Glorot # Date 1243526793 14400 # Node ID 6789c6c38e04346d97301be6634409782afd157c # Parent 4c536c570957c0c6549e4802e6c647e0a7bb6b6e added a NLL method to the StackedDAAig diff -r 4c536c570957 -r 6789c6c38e04 pylearn/algorithms/sandbox/DAA_inputs_groups.py --- 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])