# HG changeset patch # User Dumitru Erhan # Date 1268258930 18000 # Node ID de3aef84714a335b916a33b82213a99e01459591 # Parent c89004f9cab29860ae8ff8874a6ff40f5776085b# Parent 1faae5079522cb2674c166d1b356abd39707e012 merge, second try diff -r 1faae5079522 -r de3aef84714a deep/convolutional_dae/stacked_convolutional_dae.py --- a/deep/convolutional_dae/stacked_convolutional_dae.py Wed Mar 10 17:01:02 2010 -0500 +++ b/deep/convolutional_dae/stacked_convolutional_dae.py Wed Mar 10 17:08:50 2010 -0500 @@ -56,7 +56,7 @@ self.b = theano.shared(value = initial_b, name = "b") - initial_b_prime= numpy.zeros((filter_shape[1],)) + initial_b_prime= numpy.zeros((filter_shape[1],),dtype=theano.config.floatX) self.W_prime=T.dtensor4('W_prime') @@ -64,7 +64,7 @@ self.x = input - self.tilde_x = theano_rng.binomial( self.x.shape, 1, 1 - corruption_level) * self.x + self.tilde_x = theano_rng.binomial( self.x.shape, 1, 1 - corruption_level,dtype=theano.config.floatX) * self.x conv1_out = conv.conv2d(self.tilde_x, self.W, filter_shape=filter_shape, image_shape=image_shape, border_mode='valid') @@ -135,7 +135,7 @@ self.conv_n_layers = len(conv_hidden_layers_sizes) self.mlp_n_layers = len(mlp_hidden_layers_sizes) - self.x = T.dmatrix('x') # the data is presented as rasterized images + self.x = T.matrix('x') # the data is presented as rasterized images self.y = T.ivector('y') # the labels are presented as 1D vector of for i in xrange( self.conv_n_layers ): @@ -156,7 +156,7 @@ self.layers += [layer] self.params += layer.params - + da_layer = dA_conv(corruption_level = corruption_levels[0], input = layer_input, shared_W = layer.W, shared_b = layer.b,