# HG changeset patch # User Frederic Bastien # Date 1244749472 14400 # Node ID 72ce8288a2835f6a2ff56ea67552d08002f4de17 # Parent 164a76c8346f8bb58da61e986d09269414dfa611 small optimisation diff -r 164a76c8346f -r 72ce8288a283 pylearn/algorithms/sandbox/DAA_inputs_groups.py --- a/pylearn/algorithms/sandbox/DAA_inputs_groups.py Thu Jun 11 13:35:31 2009 -0400 +++ b/pylearn/algorithms/sandbox/DAA_inputs_groups.py Thu Jun 11 15:44:32 2009 -0400 @@ -19,6 +19,7 @@ if type == 'l1': return T.sum(T.abs(param)) if type == 'l2': + return T.sum(param*param)#faster... return T.sum(T.pow(param,2)) raise NotImplementedError('Only l1 and l2 regularization are currently implemented')