Mercurial > ift6266
changeset 206:e12702b88a2d
removed one bug: the complexity value was not sent to the dA class
author | youssouf |
---|---|
date | Thu, 04 Mar 2010 09:43:23 -0500 |
parents | 70a9df1cd20e |
children | 43af74a348ac |
files | deep/autoencoder/DA_training.py |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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