Exemplo n.º 1
0
 def __init__(self, in_module, out_module, name=None):
     connection.__init__(self, in_module, out_module, name=name)
     self.weights = zeros(self.dims)
     self.deltas = ndarray(self.outdim)
     self.math = math()
     for i in xrange(self.outdim):
         for h in xrange(self.indim):
             for k in xrange(16):
                 self.weights[h,i,k] = random.randint(1,10)
Exemplo n.º 2
0
 def __init__(self, in_module, out_module, name=None):
     connection.__init__(self, in_module, out_module, name=name)
     self.weights = zeros(self.dims)
     self.math = math()
     self.math.generate_weights((self.outdim, self.indim, 16), self.weights)
     self.deltas = ndarray(self.outdim)
Exemplo n.º 3
0
 def __init__(self, previous_neurons, next_neurons):
     self.shape = (previous_neurons.size, next_neurons.size, SYNAPSES)
     layer_base.__init__(self, previous_neurons, next_neurons, self.shape)
     self.learning_rate = 1.0
     self.math = math()