コード例 #1
0
 def __init__(self, n_neurons, machine_time_step, v_init, v_rest, tau_m, cm,
              i_offset, v_reset, tau_refrac):
     NeuronModelLeakyIntegrate.__init__(self, n_neurons, machine_time_step,
                                        v_init, v_rest, tau_m, cm, i_offset)
     self._v_reset = utility_calls.convert_param_to_numpy(
         v_reset, n_neurons)
     self._tau_refrac = utility_calls.convert_param_to_numpy(
         tau_refrac, n_neurons)
コード例 #2
0
 def __init__(self, n_neurons, machine_time_step, v_init, v_rest, tau_m, cm,
              i_offset, v_reset, tau_refrac):
     NeuronModelLeakyIntegrate.__init__(
         self, n_neurons, machine_time_step, v_init, v_rest, tau_m, cm,
         i_offset)
     self._v_reset = utility_calls.convert_param_to_numpy(
         v_reset, n_neurons)
     self._tau_refrac = utility_calls.convert_param_to_numpy(
         tau_refrac, n_neurons)
コード例 #3
0
    def __init__(self, n_neurons, v_init, v_rest, tau_m, cm, i_offset, v_reset,
                 tau_refrac):
        NeuronModelLeakyIntegrate.__init__(self, n_neurons, v_init, v_rest,
                                           tau_m, cm, i_offset)
        self._v_reset = utility_calls.convert_param_to_numpy(
            v_reset, n_neurons)
        self._tau_refrac = utility_calls.convert_param_to_numpy(
            tau_refrac, n_neurons)
        self._countdown_to_refactory_period = \
            utility_calls.convert_param_to_numpy(0, n_neurons)

        self._my_units = {'v_reset': 'mV', 'tau_refac': 'ms'}
コード例 #4
0
    def get_neural_parameters(self):
        params = NeuronModelLeakyIntegrate.get_neural_parameters(self)
        params.extend([

            # countdown to end of next refractory period [timesteps]
            # int32_t  refract_timer;
            NeuronParameter(0, DataType.INT32),

            # post-spike reset membrane voltage [mV]
            # REAL     V_reset;
            NeuronParameter(self._v_reset, DataType.S1615),

            # refractory time of neuron [timesteps]
            # int32_t  T_refract;
            NeuronParameter(self._tau_refrac_timesteps, DataType.INT32)
        ])
        return params
コード例 #5
0
    def get_neural_parameters(self):
        params = NeuronModelLeakyIntegrate.get_neural_parameters(self)
        params.extend([

            # countdown to end of next refractory period [timesteps]
            # int32_t  refract_timer;
            NeuronParameter(0, DataType.INT32),

            # post-spike reset membrane voltage [mV]
            # REAL     V_reset;
            NeuronParameter(self._v_reset, DataType.S1615),

            # refractory time of neuron [timesteps]
            # int32_t  T_refract;
            NeuronParameter(self._tau_refrac_timesteps, DataType.INT32)
        ])
        return params
コード例 #6
0
    def get_neural_parameters(self, machine_time_step):
        params = NeuronModelLeakyIntegrate.get_neural_parameters(self)
        params.extend([

            # count down to end of next refractory period [timesteps]
            # int32_t  refract_timer;
            NeuronParameter(self._countdown_to_refactory_period,
                            _LIF_TYPES.REFRACT_COUNT.data_type),

            # post-spike reset membrane voltage [mV]
            # REAL     V_reset;
            NeuronParameter(self._v_reset, _LIF_TYPES.V_RESET.data_type),

            # refractory time of neuron [timesteps]
            # int32_t  T_refract;
            NeuronParameter(self._tau_refrac_timesteps(machine_time_step),
                            _LIF_TYPES.TAU_REFRACT.data_type)
        ])
        return params
コード例 #7
0
    def get_n_cpu_cycles_per_neuron(self):

        # A guess - 20 for the reset procedure
        return NeuronModelLeakyIntegrate.get_n_cpu_cycles_per_neuron(self) + 20
コード例 #8
0
 def get_neural_parameter_types(self):
     if_types = NeuronModelLeakyIntegrate.get_neural_parameter_types(self)
     if_types.extend([item.data_type for item in _LIF_TYPES])
     return if_types
コード例 #9
0
 def get_n_neural_parameters(self):
     return NeuronModelLeakyIntegrate.get_n_neural_parameters(self) + 3
コード例 #10
0
 def get_units(self, variable):
     if variable in self._my_units:
         return self._my_units[variable]
     else:
         return NeuronModelLeakyIntegrate.get_units(variable)
コード例 #11
0
    def get_n_cpu_cycles_per_neuron(self):

        # A guess - 20 for the reset procedure
        return NeuronModelLeakyIntegrate.get_n_cpu_cycles_per_neuron(self) + 20
コード例 #12
0
 def get_n_neural_parameters(self):
     return NeuronModelLeakyIntegrate.get_n_neural_parameters(self) + 3