diff deep/stacked_dae/stacked_dae.py @ 208:acb942530923

Completely rewrote my series module, now based on HDF5 and PyTables (in a separate directory called 'tables_series' for retrocompatibility of running code). Minor (inconsequential) changes to stacked_dae.
author fsavard
date Fri, 05 Mar 2010 18:07:20 -0500
parents e1f5f66dd7dd
children 7b4507295eba
line wrap: on
line diff
--- a/deep/stacked_dae/stacked_dae.py	Thu Mar 04 08:21:43 2010 -0500
+++ b/deep/stacked_dae/stacked_dae.py	Fri Mar 05 18:07:20 2010 -0500
@@ -140,6 +140,11 @@
     #self.L = - T.sum( self.x*T.log(self.z) + (1-self.x)*T.log(1-self.z), axis=1 ) 
     #self.L = binary_cross_entropy(target=self.x, output=self.z, sum_axis=1)
 
+    # bypassing z to avoid running to log(0)
+    #self.z_a = T.dot(self.y, self.W_prime) + self.b_prime)
+    #self.L = -T.sum( self.x * (T.log(1)-T.log(1+T.exp(-self.z_a))) \
+    #                + (1.0-self.x) * (T.log(1)-T.log(1+T.exp(-self.z_a))), axis=1 )
+
     # I added this epsilon to avoid getting log(0) and 1/0 in grad
     # This means conceptually that there'd be no probability of 0, but that
     # doesn't seem to me as important (maybe I'm wrong?).