comparison algorithms/daa.py @ 488:e06666ac32d5

Added another todo
author Joseph Turian <turian@gmail.com>
date Tue, 28 Oct 2008 02:39:00 -0400
parents 94a4c5b7293b
children c7ce66b4e8f4
comparison
equal deleted inserted replaced
487:94a4c5b7293b 488:e06666ac32d5
10 10
11 def __init__(self, input = None, regularize = True, tie_weights = True, 11 def __init__(self, input = None, regularize = True, tie_weights = True,
12 activation_function=NN.sigmoid, reconstruction_cost_function=cost.cross_entropy): 12 activation_function=NN.sigmoid, reconstruction_cost_function=cost.cross_entropy):
13 """ 13 """
14 @param reconstruction_cost: Should return one cost per example (row) 14 @param reconstruction_cost: Should return one cost per example (row)
15 @todo: Default noise level for all daa levels
15 """ 16 """
16 super(DenoisingAA, self).__init__() 17 super(DenoisingAA, self).__init__()
17 18
18 # MODEL CONFIGURATION 19 # MODEL CONFIGURATION
19 self.regularize = regularize 20 self.regularize = regularize
129 130
130 131
131 class SigmoidXEDenoisingAA(DenoisingAA): 132 class SigmoidXEDenoisingAA(DenoisingAA):
132 """ 133 """
133 @todo: Merge this into the above. 134 @todo: Merge this into the above.
135 @todo: Default noise level for all daa levels
134 """ 136 """
135 137
136 def build_corrupted_input(self): 138 def build_corrupted_input(self):
137 self.noise_level = theano.Member(T.scalar()) 139 self.noise_level = theano.Member(T.scalar())
138 return self.random.binomial(T.shape(self.input), 1, 1 - self.noise_level) * self.input 140 return self.random.binomial(T.shape(self.input), 1, 1 - self.noise_level) * self.input