# HG changeset patch # User youssouf # Date 1267713803 18000 # Node ID e12702b88a2d6fb360297b0e368a6048f86e451a # Parent 70a9df1cd20e7232d524c9e921973fc4f98ff58c removed one bug: the complexity value was not sent to the dA class diff -r 70a9df1cd20e -r e12702b88a2d deep/autoencoder/DA_training.py --- a/deep/autoencoder/DA_training.py Tue Mar 02 09:52:27 2010 -0500 +++ b/deep/autoencoder/DA_training.py Thu Mar 04 09:43:23 2010 -0500 @@ -93,7 +93,12 @@ theano_rng = RandomStreams() # create a numpy random generator numpy_rng = numpy.random.RandomState() - + + # print the parameter of the DA + if True : + print 'input size = %d' %n_visible + print 'hidden size = %d' %n_hidden + print 'complexity = %2.2f' %complexity # initial values for weights and biases # note : W' was written as `W_prime` and b' as `b_prime` @@ -250,7 +255,7 @@ # construct the denoising autoencoder class n_ins = 32*32 - encoder = dA(n_ins, n_code_layer, input = x.reshape((batch_size,n_ins))) + encoder = dA(n_ins, n_code_layer, complexity, input = x.reshape((batch_size,n_ins))) # Train autoencoder @@ -363,7 +368,7 @@ test_score)) if patience <= iter : - print('iter (%i) is superior than patience(%i). break', iter, patience) + print('iter (%i) is superior than patience(%i). break', (iter, patience)) break @@ -451,7 +456,7 @@ # construct the denoising autoencoder class n_ins = 28*28 - encoder = dA(n_ins, n_code_layer, input = x.reshape((batch_size,n_ins))) + encoder = dA(n_ins, n_code_layer, complexity, input = x.reshape((batch_size,n_ins))) # Train autoencoder