changeset 868:c3e7ae2bdb4b

improved the initialization range for weights in convolutional version of Rust2005
author James Bergstra <bergstrj@iro.umontreal.ca>
date Tue, 10 Nov 2009 17:49:10 -0500
parents aaaed35c995e
children 2fffbfa41920
files pylearn/shared/layers/rust2005.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/shared/layers/rust2005.py	Tue Nov 10 17:48:44 2009 -0500
+++ b/pylearn/shared/layers/rust2005.py	Tue Nov 10 17:49:10 2009 -0500
@@ -241,8 +241,8 @@
         b_shp = (n_filters,)
 
         if w_range is None:
-            w_low = -2.0/numpy.sqrt(image_shape[0] * image_shape[1])
-            w_high = 2.0/numpy.sqrt(image_shape[0] * image_shape[1])
+            w_low = -2.0/numpy.sqrt(image_shape[0] * image_shape[1] * n_channels)
+            w_high = 2.0/numpy.sqrt(image_shape[0] * image_shape[1] * n_channels)
         else:
             w_low, w_high = w_range