comparison gradient_learner.py @ 29:46c5c90019c2

Changed apply_function so that it propagates methods of the source.
author bengioy@grenat.iro.umontreal.ca
date Fri, 11 Apr 2008 15:46:18 -0400
parents 672fe4b23032
children
comparison
equal deleted inserted replaced
28:541a273bc89f 29:46c5c90019c2
57 use_function_key = input_fields+output_fields 57 use_function_key = input_fields+output_fields
58 if not self.use_functions.has_key(use_function_key): 58 if not self.use_functions.has_key(use_function_key):
59 self.use_function[use_function_key]=Function(input_variables,output_variables) 59 self.use_function[use_function_key]=Function(input_variables,output_variables)
60 use_function = self.use_functions[use_function_key] 60 use_function = self.use_functions[use_function_key]
61 # return a dataset that computes the outputs 61 # return a dataset that computes the outputs
62 return input_dataset.applyFunction(use_function,input_fields,output_fields,copy_inputs,compute_now=True) 62 return input_dataset.apply_function(use_function,input_fields,output_fields,copy_inputs,compute_now=True)
63 63
64 64
65 class StochasticGradientDescent(object): 65 class StochasticGradientDescent(object):
66 def update_parameters(self): 66 def update_parameters(self):
67 67