Mercurial > pylearn
comparison linear_regression.py @ 528:cfe3f62a08cb
bugfix, outputs needed to be in a list in the past, not anymore.
author | Frederic Bastien <bastienf@iro.umontreal.ca> |
---|---|
date | Mon, 17 Nov 2008 13:17:00 -0500 |
parents | 111e547ffa7b |
children |
comparison
equal
deleted
inserted
replaced
527:3eb59514b534 | 528:cfe3f62a08cb |
---|---|
100 if cls.__compiled: | 100 if cls.__compiled: |
101 return | 101 return |
102 def fn(input_vars,output_vars): | 102 def fn(input_vars,output_vars): |
103 return staticmethod(theano.function(input_vars, output_vars, mode=mode)) | 103 return staticmethod(theano.function(input_vars, output_vars, mode=mode)) |
104 | 104 |
105 cls.compute_outputs = fn([cls.inputs,cls.theta],[cls.outputs]) | 105 cls.compute_outputs = fn([cls.inputs,cls.theta],cls.outputs) |
106 cls.compute_errors = fn([cls.outputs,cls.targets],[cls.squared_errors]) | 106 cls.compute_errors = fn([cls.outputs,cls.targets],cls.squared_errors) |
107 | 107 |
108 cls.__compiled = True | 108 cls.__compiled = True |
109 | 109 |
110 def __init__(self): | 110 def __init__(self): |
111 self.compile() | 111 self.compile() |