comparison denoising_aa.py @ 211:bd728c83faff

in __get__, problem if the i.stop was None, i being the slice, added one line replacing None by the len(self)
author Thierry Bertin-Mahieux <bertinmt@iro.umontreal.ca>
date Wed, 21 May 2008 17:39:30 -0400
parents ffd50efefb70
children df3fae88ab46
comparison
equal deleted inserted replaced
210:ffd50efefb70 211:bd728c83faff
102 self.denoising_autoencoder_formula = corruption_formula + autoencoder.rename(x='corrupted_x') 102 self.denoising_autoencoder_formula = corruption_formula + autoencoder.rename(x='corrupted_x')
103 103
104 def __call__(self, training_set=None): 104 def __call__(self, training_set=None):
105 model = DenoisingAutoEncoderModel(self) 105 model = DenoisingAutoEncoderModel(self)
106 if training_set: 106 if training_set:
107 print 'what do I do if training set????'
107 108
108 def compile(self, inputs, outputs): 109 def compile(self, inputs, outputs):
109 return theano.function(inputs,outputs,unpack_single=False,linker=self.linker) 110 return theano.function(inputs,outputs,unpack_single=False,linker=self.linker)
110 111
111 class DenoisingAutoEncoderModel(LearnerModel): 112 class DenoisingAutoEncoderModel(LearnerModel):
116 self.update_fn = learning_algorithm.compile(learning_algorithm.denoising_autoencoder_formula.inputs, 117 self.update_fn = learning_algorithm.compile(learning_algorithm.denoising_autoencoder_formula.inputs,
117 learning_algorithm.denoising_autoencoder_formula.outputs) 118 learning_algorithm.denoising_autoencoder_formula.outputs)
118 119
119 def update(self, training_set, train_stats_collector=None): 120 def update(self, training_set, train_stats_collector=None):
120 121
122 print 'dont update you crazy frog!'
121 123
122 # old stuff 124 # old stuff
123 125
124 # self._learning_rate = t.scalar('learning_rate') # this is the symbol 126 # self._learning_rate = t.scalar('learning_rate') # this is the symbol
125 # self.L1_regularizer = L1_regularizer 127 # self.L1_regularizer = L1_regularizer