diff algorithms/stacker.py @ 503:c7ce66b4e8f4

Extensions to algorithms, and some cleanup (by defining linear_output result).
author Joseph Turian <turian@gmail.com>
date Wed, 29 Oct 2008 03:29:18 -0400
parents 2be795cc5c3a
children 2b0e10ac6929
line wrap: on
line diff
--- a/algorithms/stacker.py	Wed Oct 29 02:08:56 2008 -0400
+++ b/algorithms/stacker.py	Wed Oct 29 03:29:18 2008 -0400
@@ -72,6 +72,8 @@
             if layer.lr is None:
                 layer.lr = lr
         if nunits:
+            obj.input_dimension = nunits[0]
+            obj.output_dimension = nunits[-1]
             if len(nunits) != len(obj.layers) + 1:
                 raise ValueError('You should give exactly one more unit numbers as there are layers.')
             for ni, no, layer in zip(nunits[:-1], nunits[1:], obj.layers):