Mercurial > pylearn
comparison linear_regression.py @ 118:d0a1bd0378c6
Finished draft of OneHiddenLayerNNetClassifier to debut learner.py
author | Yoshua Bengio <bengioy@iro.umontreal.ca> |
---|---|
date | Wed, 07 May 2008 15:07:56 -0400 |
parents | 88257dfedf8c |
children | f6505ec32dc3 |
comparison
equal
deleted
inserted
replaced
111:88257dfedf8c | 118:d0a1bd0378c6 |
---|---|
112 self._regularizer = self._L2_regularizer * t.dot(self._W,self._W) | 112 self._regularizer = self._L2_regularizer * t.dot(self._W,self._W) |
113 self._new_XtX = add_inplace(self._XtX,t.dot(self._extended_input.T,self._extended_input)) | 113 self._new_XtX = add_inplace(self._XtX,t.dot(self._extended_input.T,self._extended_input)) |
114 self._new_XtY = add_inplace(self._XtY,t.dot(self._extended_input.T,self._target)) | 114 self._new_XtY = add_inplace(self._XtY,t.dot(self._extended_input.T,self._target)) |
115 self._new_theta = t.solve_inplace(self._theta,self._XtX,self._XtY) | 115 self._new_theta = t.solve_inplace(self._theta,self._XtX,self._XtY) |
116 | 116 |
117 OneShotTLearner.__init__(self) | 117 MinibatchUpdatesTLearner.__init__(self) |
118 | 118 |
119 def allocate(self,minibatch): | 119 def allocate(self,minibatch): |
120 minibatch_n_inputs = minibatch["input"].shape[1] | 120 minibatch_n_inputs = minibatch["input"].shape[1] |
121 minibatch_n_outputs = minibatch["target"].shape[1] | 121 minibatch_n_outputs = minibatch["target"].shape[1] |
122 if not self._n_inputs: | 122 if not self._n_inputs: |