comparison sandbox/simple_autoassociator/parameters.py @ 404:8cc11ac97087

Debugging simple AA a bit
author Joseph Turian <turian@gmail.com>
date Thu, 10 Jul 2008 00:51:32 -0400
parents 36baeb7125a4
children faffaae0d2f9
comparison
equal deleted inserted replaced
403:273e5c03003e 404:8cc11ac97087
18 if randomly_initialize: 18 if randomly_initialize:
19 numpy.random.seed(seed) 19 numpy.random.seed(seed)
20 self.w1 = (numpy.random.rand(input_dimension, hidden_dimension)-0.5)/input_dimension 20 self.w1 = (numpy.random.rand(input_dimension, hidden_dimension)-0.5)/input_dimension
21 self.w2 = (numpy.random.rand(hidden_dimension, input_dimension)-0.5)/hidden_dimension 21 self.w2 = (numpy.random.rand(hidden_dimension, input_dimension)-0.5)/hidden_dimension
22 self.b1 = numpy.zeros(hidden_dimension) 22 self.b1 = numpy.zeros(hidden_dimension)
23 self.b2 = numpy.zeros(input_dimension) 23 #self.b2 = numpy.zeros(input_dimension)
24 self.b2 = numpy.array([10, 0, 0, -10])
24 else: 25 else:
25 self.w1 = numpy.zeros((input_dimension, hidden_dimension)) 26 self.w1 = numpy.zeros((input_dimension, hidden_dimension))
26 self.w2 = numpy.zeros((hidden_dimension, input_dimension)) 27 self.w2 = numpy.zeros((hidden_dimension, input_dimension))
27 self.b1 = numpy.zeros(hidden_dimension) 28 self.b1 = numpy.zeros(hidden_dimension)
28 self.b2 = numpy.zeros(input_dimension) 29 self.b2 = numpy.zeros(input_dimension)