changeset 229:02eb98d051fe

Corrigé bug avec nouvelle formule de coût et printout pour cas sur CPU
author fsavard
date Fri, 12 Mar 2010 11:03:51 -0500
parents 851e7ad4a143
children 8a94a5c808cd
files deep/stacked_dae/v2/nist_sda.py deep/stacked_dae/v2/sgd_optimization.py deep/stacked_dae/v2/stacked_dae.py
diffstat 3 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/deep/stacked_dae/v2/nist_sda.py	Fri Mar 12 10:47:36 2010 -0500
+++ b/deep/stacked_dae/v2/nist_sda.py	Fri Mar 12 11:03:51 2010 -0500
@@ -69,7 +69,7 @@
                        'hidden_layers_sizes':800,
                        'corruption_levels':0.2,
                        'minibatch_size':20,
-                       'reduce_train_to':30000,
+                       'reduce_train_to':10000,
                        'num_hidden_layers':1})
 
 '''
--- a/deep/stacked_dae/v2/sgd_optimization.py	Fri Mar 12 10:47:36 2010 -0500
+++ b/deep/stacked_dae/v2/sgd_optimization.py	Fri Mar 12 11:03:51 2010 -0500
@@ -25,6 +25,7 @@
         shared_y = theano.shared(numpy.asarray(data_y, dtype=theano.config.floatX))
         shared_y = T.cast(shared_y, 'int32')
     else:
+        print "WILL RUN ON CPU, NOT GPU, SO DATASETS REMAIN IN BYTES"
         shared_x = theano.shared(data_x)
         shared_y = theano.shared(data_y)
     return shared_x, shared_y
--- a/deep/stacked_dae/v2/stacked_dae.py	Fri Mar 12 10:47:36 2010 -0500
+++ b/deep/stacked_dae/v2/stacked_dae.py	Fri Mar 12 11:03:51 2010 -0500
@@ -144,7 +144,7 @@
     z_a = T.dot(self.y, self.W_prime) + self.b_prime
     log_sigmoid = T.log(1.) - T.log(1.+T.exp(-z_a))
     # log(1-sigmoid(z_a))
-    log_1_sigmoid = -self.z_a - T.log(1.+T.exp(-z_a))
+    log_1_sigmoid = -z_a - T.log(1.+T.exp(-z_a))
     self.L = -T.sum( self.x * (log_sigmoid) \
                     + (1.0-self.x) * (log_1_sigmoid), axis=1 )