changeset 485:e8c37244b54f

Small bugfix in regularization
author Joseph Turian <turian@gmail.com>
date Tue, 28 Oct 2008 01:37:32 -0400
parents 3daabc7f94ff
children 5ccb1662f9f6
files algorithms/daa.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/algorithms/daa.py	Tue Oct 28 01:33:27 2008 -0400
+++ b/algorithms/daa.py	Tue Oct 28 01:37:32 2008 -0400
@@ -138,7 +138,7 @@
         if self.tie_weights:
             return self.l2_coef * T.sum(self.w1 * self.w1)
         else:
-            return self.l2_coef * T.sum(self.w1 * self.w1) + T.sum(self.w2 * self.w2)
+            return self.l2_coef * (T.sum(self.w1 * self.w1) + T.sum(self.w2 * self.w2))
 
     def _instance_initialize(self, obj, input_size = None, hidden_size = None, seed = None, **init):
         init.setdefault('noise_level', 0)