comparison algorithms/regressor.py @ 516:2b0e10ac6929

misc
author Olivier Breuleux <breuleuo@iro.umontreal.ca>
date Mon, 03 Nov 2008 00:10:18 -0500
parents 8fcd0f3d9a17
children
comparison
equal deleted inserted replaced
515:dc2d93590da0 516:2b0e10ac6929
43 gradients = T.grad(self.cost, self.params) 43 gradients = T.grad(self.cost, self.params)
44 updates = dict((p, p - self.lr * g) for p, g in zip(self.params, gradients)) 44 updates = dict((p, p - self.lr * g) for p, g in zip(self.params, gradients))
45 45
46 # INTERFACE METHODS 46 # INTERFACE METHODS
47 self.update = theano.Method([self.input, self.target], self.cost, updates) 47 self.update = theano.Method([self.input, self.target], self.cost, updates)
48 self.get_cost = theano.Method([self.input, self.target], self.cost)
48 self.predict = theano.Method(self.input, self.output) 49 self.predict = theano.Method(self.input, self.output)
49 50
50 self.build_extensions() 51 self.build_extensions()
51 52
52 def _instance_initialize(self, obj, input_size = None, output_size = None, seed = None, **init): 53 def _instance_initialize(self, obj, input_size = None, output_size = None, seed = None, **init):