changeset 767:1e97e7c7f11f

very small opt.
author Frederic Bastien <bastienf@iro.umontreal.ca>
date Mon, 08 Jun 2009 12:14:14 -0400
parents d7d8877e03f8
children bd95e8ea99d8
files pylearn/sandbox/scan_inputs_groups.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/sandbox/scan_inputs_groups.py	Fri Jun 05 15:27:21 2009 -0400
+++ b/pylearn/sandbox/scan_inputs_groups.py	Mon Jun 08 12:14:14 2009 -0400
@@ -311,8 +311,8 @@
             raise NotImplementedError('index superior to weight list length',idx_list)
         if len(idx_list) != len(args[1]) :
             raise NotImplementedError('size of index different of inputs list size',idx_list)
-        for i in range(len(args)-4):
-            if (args[3+i].shape)[0] != n_hid:
+        for a in args[3:]:
+            if a.shape[0] != n_hid:
                 raise NotImplementedError('different length of hidden in the weights list',args[3+i].shape)
     
         zidx=numpy.zeros((len(idx_list)+1))