示例#1
0
 def __init__(self, size, dt=0.001, t_rc=0.02, t_ref=0.002):
     Neuron.__init__(self, size, dt)
     self.t_rc = t_rc
     self.t_ref = t_ref
     self.voltage = theano.shared(
         numpy.zeros(size).astype('float32'))  # internal variables
     self.refractory_time = theano.shared(
         numpy.zeros(size).astype('float32'))  # internal variables
示例#2
0
    def __init__(self, inputs, weights, bias):
        Neuron.__init__(self, inputs)

        # NOTE: The weights and bias properties here are not
        # numbers, but rather references to other neurons.
        # The weight and bias values are stored within the
        # respective neurons.
        self.weights = weights
        self.bias = bias
示例#3
0
 def __init__(self, size, dt=0.001, tau_rc=0.02, tau_ref=0.002):
     """Constructor for a set of LIF rate neuron
     
     :param int size: number of neurons in set
     :param float dt: timestep for neuron update function
     :param float t_rc: the RC time constant 
     :param float tau_ref: refractory period length (s)
     """
     Neuron.__init__(self, size, dt)
     self.tau_rc = tau_rc
     self.tau_ref = tau_ref
示例#4
0
 def __init__(self, size, dt=0.001, tau_rc=0.02, tau_ref=0.002):
     """Constructor for a set of LIF rate neuron
     
     :param int size: number of neurons in set
     :param float dt: timestep for neuron update function
     :param float t_rc: the RC time constant 
     :param float tau_ref: refractory period length (s)
     """
     Neuron.__init__(self, size, dt)
     self.tau_rc = tau_rc
     self.tau_ref = tau_ref
示例#5
0
文件: lif.py 项目: Elhamahm/nengo_1.4
 def __init__(self, size, dt=0.001, tau_rc=0.02, tau_ref=0.002):
     """ Constructor for a set of LIF rate neuron
     
     :param int size: number of neurons in set
     :param float dt: timestep for neuron update function
     :param float tau_rc: the RC time constant 
     :param float tau_ref: refractory period length (s)
     """
     Neuron.__init__(self, size, dt)
     self.tau_rc = tau_rc
     self.tau_ref  = tau_ref
     self.voltage = theano.shared(numpy.zeros(size).astype('float32'))          # internal variables
     self.refractory_time = theano.shared(numpy.zeros(size).astype('float32'))  # internal variables
示例#6
0
 def __init__(self, size, dt=0.001, tau_rc=0.02, tau_ref=0.002):
     """ Constructor for a set of LIF rate neuron
     
     :param int size: number of neurons in set
     :param float dt: timestep for neuron update function
     :param float tau_rc: the RC time constant 
     :param float tau_ref: refractory period length (s)
     """
     Neuron.__init__(self, size, dt)
     self.tau_rc = tau_rc
     self.tau_ref = tau_ref
     self.voltage = theano.shared(
         numpy.zeros(size).astype('float32'))  # internal variables
     self.refractory_time = theano.shared(
         numpy.zeros(size).astype('float32'))  # internal variables
示例#7
0
 def __init__(self, pos, value=False):
     super().__init__()
     self.setPos(pos)
     Neuron.__init__(self, NEURONTYPEIN)
     self.value = value
示例#8
0
 def __init__(self,size,dt=0.001,t_rc=0.02,t_ref=0.002):
     Neuron.__init__(self,size,dt)
     self.t_rc=t_rc
     self.t_ref=t_ref
     self.voltage=theano.shared(numpy.zeros(size).astype('float32'))          # internal variables
     self.refractory_time=theano.shared(numpy.zeros(size).astype('float32'))  # internal variables
示例#9
0
文件: add.py 项目: elmasria/mini-flow
 def __init__(self, *inputs):
     Neuron.__init__(self, inputs)
示例#10
0
 def __init__(self):
     # An Input neuron has no inbound neurons,
     # so no need to pass anything to the Neuron instantiator.
     Neuron.__init__(self)
示例#11
0
 def __init__(self,size,dt=0.001,t_rc=0.02,t_ref=0.002):
     Neuron.__init__(self,size,dt)
     self.t_rc=t_rc
     self.t_ref=t_ref
示例#12
0
 def __init__(self, size, dt=0.001, t_rc=0.02, t_ref=0.002):
     Neuron.__init__(self, size, dt)
     self.t_rc = t_rc
     self.t_ref = t_ref
示例#13
0
	def __init__(self, alpha=0.01, epochs=10, seed=2):
		Neuron.__init__(self, alpha, epochs, seed)