Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix doxygen parameters #38

Merged
merged 5 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion models/eprop_iaf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ eprop_iaf::Parameters_::set( const DictionaryDatum& d, Node* node )

if ( c_reg_ < 0 )
{
throw BadProperty( "Firing rate regularization prefactor c_reg ≥ 0 required." );
throw BadProperty( "Firing rate regularization coefficient c_reg ≥ 0 required." );
}

if ( f_target_ < 0 )
Expand Down
26 changes: 14 additions & 12 deletions models/eprop_iaf.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ V_th mV :math:`v_\text{th}` -55.0 Spi
----------------------------------------------------------------------------------------------------------------
Parameter Unit Math equivalent Default Description
=========================== ==== =========================== ================ ==================================
c_reg :math:`c_\text{reg}` 0.0 Prefactor of firing rate
c_reg :math:`c_\text{reg}` 0.0 Coefficient of firing rate
regularization
eprop_isi_trace_cutoff ms :math:`{\Delta t}_\text{c}` maximum value Cutoff for integration of
representable e-prop update between two
Expand Down Expand Up @@ -347,6 +347,8 @@ EndUserDocs */
void register_eprop_iaf( const std::string& name );

/**
* @brief Class implementing a LIF neuron model for e-prop plasticity with additional biological features.
*
* Class implementing a current-based leaky integrate-and-fire neuron model with delta-shaped postsynaptic currents for
* e-prop plasticity according to Bellec et al. (2020) with additional biological features described in
* Korcsak-Gorzo, Stapmanns, and Espinoza Valverde et al. (in preparation).
Expand Down Expand Up @@ -385,16 +387,16 @@ class eprop_iaf : public EpropArchivingNodeRecurrent

void update( Time const&, const long, const long ) override;

void compute_gradient( const long t_spike,
const long t_spike_previous,
double& z_previous_buffer,
double& z_bar,
double& e_bar,
double& e_bar_reg,
double& epsilon,
double& weight,
const CommonSynapseProperties& cp,
WeightOptimizer* optimizer ) override;
void compute_gradient( const long,
const long,
double&,
double&,
double&,
double&,
double&,
double&,
const CommonSynapseProperties&,
WeightOptimizer* ) override;

long get_shift() const override;
bool is_eprop_recurrent_node() const override;
Expand All @@ -415,7 +417,7 @@ class eprop_iaf : public EpropArchivingNodeRecurrent
//! Capacitance of the membrane (pF).
double C_m_;

//! Prefactor of firing rate regularization.
//! Coefficient of firing rate regularization.
double c_reg_;

//! Leak / resting membrane potential (mV).
Expand Down
2 changes: 1 addition & 1 deletion models/eprop_iaf_adapt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ eprop_iaf_adapt::Parameters_::set( const DictionaryDatum& d, Node* node )

if ( c_reg_ < 0 )
{
throw BadProperty( "Firing rate regularization prefactor c_reg ≥ 0 required." );
throw BadProperty( "Firing rate regularization coefficient c_reg ≥ 0 required." );
}

if ( f_target_ < 0 )
Expand Down
26 changes: 14 additions & 12 deletions models/eprop_iaf_adapt.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ V_th mV :math:`v_\text{th}` -55.0 Spi
----------------------------------------------------------------------------------------------------------------
Parameter Unit Math equivalent Default Description
=========================== ======= =========================== ================ ===============================
c_reg :math:`c_\text{reg}` 0.0 Prefactor of firing rate
c_reg :math:`c_\text{reg}` 0.0 Coefficient of firing rate
regularization
eprop_isi_trace_cutoff ms :math:`{\Delta t}_\text{c}` maximum value Cutoff for integration of
representable e-prop update between two
Expand Down Expand Up @@ -315,6 +315,8 @@ EndUserDocs */
void register_eprop_iaf_adapt( const std::string& name );

/**
* @brief Class implementing an adaptive LIF neuron model for e-prop plasticity with additional biological features.
*
* Class implementing a current-based leaky integrate-and-fire neuron model with delta-shaped postsynaptic currents and
* threshold adaptation for e-prop plasticity according to Bellec et al. (2020) with additional biological features
* described in Korcsak-Gorzo, Stapmanns, and Espinoza Valverde et al. (in preparation).
Expand Down Expand Up @@ -353,16 +355,16 @@ class eprop_iaf_adapt : public EpropArchivingNodeRecurrent

void update( Time const&, const long, const long ) override;

void compute_gradient( const long t_spike,
const long t_spike_previous,
double& z_previous_buffer,
double& z_bar,
double& e_bar,
double& e_bar_reg,
double& epsilon,
double& weight,
const CommonSynapseProperties& cp,
WeightOptimizer* optimizer ) override;
void compute_gradient( const long,
const long,
double&,
double&,
double&,
double&,
double&,
double&,
const CommonSynapseProperties&,
WeightOptimizer* ) override;

long get_shift() const override;
bool is_eprop_recurrent_node() const override;
Expand All @@ -389,7 +391,7 @@ class eprop_iaf_adapt : public EpropArchivingNodeRecurrent
//! Capacitance of the membrane (pF).
double C_m_;

//! Prefactor of firing rate regularization.
//! Coefficient of firing rate regularization.
double c_reg_;

//! Leak / resting membrane potential (mV).
Expand Down
2 changes: 1 addition & 1 deletion models/eprop_iaf_adapt_bsshslm_2020.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ eprop_iaf_adapt_bsshslm_2020::Parameters_::set( const DictionaryDatum& d, Node*

if ( c_reg_ < 0 )
{
throw BadProperty( "Firing rate regularization prefactor c_reg ≥ 0 required." );
throw BadProperty( "Firing rate regularization coefficient c_reg ≥ 0 required." );
}

if ( f_target_ < 0 )
Expand Down
12 changes: 5 additions & 7 deletions models/eprop_iaf_adapt_bsshslm_2020.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ V_th mV :math:`v_\text{th}` -55.0 Spi
----------------------------------------------------------------------------------------------------------------
Parameter Unit Math equivalent Default Description
=========================== ======= ======================= ================ ===================================
c_reg :math:`c_\text{reg}` 0.0 Prefactor of firing rate
c_reg :math:`c_\text{reg}` 0.0 Coefficient of firing rate
regularization
f_target Hz :math:`f^\text{target}` 10.0 Target firing rate of rate
regularization
Expand Down Expand Up @@ -285,6 +285,8 @@ EndUserDocs */
void register_eprop_iaf_adapt_bsshslm_2020( const std::string& name );

/**
* @brief Class implementing an adaptive LIF neuron model for e-prop plasticity.
*
* Class implementing a current-based leaky integrate-and-fire neuron model with delta-shaped postsynaptic currents and
* threshold adaptation for e-prop plasticity according to Bellec et al. (2020).
*/
Expand Down Expand Up @@ -322,11 +324,7 @@ class eprop_iaf_adapt_bsshslm_2020 : public EpropArchivingNodeRecurrent

void update( Time const&, const long, const long ) override;

double compute_gradient( std::vector< long >& presyn_isis,
const long t_previous_update,
const long t_previous_trigger_spike,
const double kappa,
const bool average_gradient ) override;
double compute_gradient( std::vector< long >&, const long, const long, const double, const bool ) override;

long get_shift() const override;
bool is_eprop_recurrent_node() const override;
Expand All @@ -352,7 +350,7 @@ class eprop_iaf_adapt_bsshslm_2020 : public EpropArchivingNodeRecurrent
//! Capacitance of the membrane (pF).
double C_m_;

//! Prefactor of firing rate regularization.
//! Coefficient of firing rate regularization.
double c_reg_;

//! Leak / resting membrane potential (mV).
Expand Down
2 changes: 1 addition & 1 deletion models/eprop_iaf_bsshslm_2020.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ eprop_iaf_bsshslm_2020::Parameters_::set( const DictionaryDatum& d, Node* node )

if ( c_reg_ < 0 )
{
throw BadProperty( "Firing rate regularization prefactor c_reg ≥ 0 required." );
throw BadProperty( "Firing rate regularization coefficient c_reg ≥ 0 required." );
}

if ( f_target_ < 0 )
Expand Down
12 changes: 5 additions & 7 deletions models/eprop_iaf_bsshslm_2020.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ V_th mV :math:`v_\text{th}` -55.0 Spi
----------------------------------------------------------------------------------------------------------------
Parameter Unit Math equivalent Default Description
=========================== ======= ======================= ================ ===================================
c_reg :math:`c_\text{reg}` 0.0 Prefactor of firing rate
c_reg :math:`c_\text{reg}` 0.0 Coefficient of firing rate
regularization
f_target Hz :math:`f^\text{target}` 10.0 Target firing rate of rate
regularization
Expand Down Expand Up @@ -270,6 +270,8 @@ EndUserDocs */
void register_eprop_iaf_bsshslm_2020( const std::string& name );

/**
* @brief Class implementing a LIF neuron model for e-prop plasticity.
*
* Class implementing a current-based leaky integrate-and-fire neuron model with delta-shaped postsynaptic currents for
* e-prop plasticity according to Bellec et al. (2020).
*/
Expand Down Expand Up @@ -307,11 +309,7 @@ class eprop_iaf_bsshslm_2020 : public EpropArchivingNodeRecurrent

void update( Time const&, const long, const long ) override;

double compute_gradient( std::vector< long >& presyn_isis,
const long t_previous_update,
const long t_previous_trigger_spike,
const double kappa,
const bool average_gradient ) override;
double compute_gradient( std::vector< long >&, const long, const long, const double, const bool ) override;

long get_shift() const override;
bool is_eprop_recurrent_node() const override;
Expand All @@ -331,7 +329,7 @@ class eprop_iaf_bsshslm_2020 : public EpropArchivingNodeRecurrent
//! Capacitance of the membrane (pF).
double C_m_;

//! Prefactor of firing rate regularization.
//! Coefficient of firing rate regularization.
double c_reg_;

//! Leak / resting membrane potential (mV).
Expand Down
2 changes: 1 addition & 1 deletion models/eprop_iaf_psc_delta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ nest::eprop_iaf_psc_delta::Parameters_::set( const DictionaryDatum& d, Node* nod
updateValueParam< bool >( d, names::refractory_input, with_refr_input_, node );
if ( c_reg_ < 0 )
{
throw BadProperty( "Firing rate regularization prefactor c_reg ≥ 0 required." );
throw BadProperty( "Firing rate regularization coefficient c_reg ≥ 0 required." );
}

if ( f_target_ < 0 )
Expand Down
24 changes: 12 additions & 12 deletions models/eprop_iaf_psc_delta.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ The following parameters can be set in the status dictionary.
-------------------------------------------------------------------------------------------------------------------
Parameter Unit Math equivalent Default Description
=========================== ======= ========================== ================ ===================================
c_reg :math:`c_\text{reg}` 0.0 Prefactor of firing rate
c_reg :math:`c_\text{reg}` 0.0 Coefficient of firing rate
regularization
f_target Hz :math:`f^\text{target}` 10.0 Target firing rate of rate
regularization
Expand Down Expand Up @@ -266,16 +266,16 @@ class eprop_iaf_psc_delta : public EpropArchivingNodeRecurrent

void update( Time const&, const long, const long ) override;

void compute_gradient( const long t_spike,
const long t_spike_previous,
double& z_previous_buffer,
double& z_bar,
double& e_bar,
double& e_bar_reg,
double& epsilon,
double& weight,
const CommonSynapseProperties& cp,
WeightOptimizer* optimizer ) override;
void compute_gradient( const long,
const long,
double&,
double&,
double&,
double&,
double&,
double&,
const CommonSynapseProperties&,
WeightOptimizer* ) override;

long get_shift() const override;
bool is_eprop_recurrent_node() const override;
Expand Down Expand Up @@ -324,7 +324,7 @@ class eprop_iaf_psc_delta : public EpropArchivingNodeRecurrent
bool with_refr_input_; //!< spikes arriving during refractory period are
//!< counted

//! Prefactor of firing rate regularization.
//! Coefficient of firing rate regularization.
double c_reg_;

//! Target firing rate of rate regularization (spikes/s).
Expand Down
2 changes: 2 additions & 0 deletions models/eprop_learning_signal_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ EndUserDocs */
void register_eprop_learning_signal_connection( const std::string& name );

/**
* @brief Class implementing a feedback connection model for e-prop plasticity with additional biological features.
*
* Class implementing a synapse model transmitting secondary feedback learning signals for e-prop plasticity
* according to Bellec et al. (2020) with additional biological features described in
* Korcsak-Gorzo, Stapmanns, and Espinoza Valverde et al. (in preparation).
Expand Down
2 changes: 2 additions & 0 deletions models/eprop_learning_signal_connection_bsshslm_2020.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ EndUserDocs */
void register_eprop_learning_signal_connection_bsshslm_2020( const std::string& name );

/**
* @brief Class implementing a feedback connection model for e-prop plasticity.
*
* Class implementing a synapse model transmitting secondary feedback learning signals for e-prop plasticity
* according to Bellec et al. (2020).
*/
Expand Down
22 changes: 12 additions & 10 deletions models/eprop_readout.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ EndUserDocs */
void register_eprop_readout( const std::string& name );

/**
* @brief Class implementing a readout neuron model for e-prop plasticity with additional biological features.
*
* Class implementing a current-based leaky integrate readout neuron model with delta-shaped postsynaptic currents for
* e-prop plasticity according to Bellec et al. (2020) with additional biological features described in
* Korcsak-Gorzo, Stapmanns, and Espinoza Valverde et al. (in preparation).
Expand Down Expand Up @@ -300,16 +302,16 @@ class eprop_readout : public EpropArchivingNodeReadout

void update( Time const&, const long, const long ) override;

void compute_gradient( const long t_spike,
const long t_spike_previous,
double& z_previous_buffer,
double& z_bar,
double& e_bar,
double& e_bar_reg,
double& epsilon,
double& weight,
const CommonSynapseProperties& cp,
WeightOptimizer* optimizer ) override;
void compute_gradient( const long,
const long,
double&,
double&,
double&,
double&,
double&,
double&,
const CommonSynapseProperties&,
WeightOptimizer* ) override;

long get_shift() const override;
bool is_eprop_recurrent_node() const override;
Expand Down
2 changes: 2 additions & 0 deletions models/eprop_readout_bsshslm_2020.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ EndUserDocs */
void register_eprop_readout_bsshslm_2020( const std::string& name );

/**
* @brief Class implementing a readout neuron model for e-prop plasticity.
*
* Class implementing a current-based leaky integrate readout neuron model with delta-shaped postsynaptic currents for
* e-prop plasticity according to Bellec et al. (2020).
*/
Expand Down
4 changes: 4 additions & 0 deletions models/eprop_synapse.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ Examples using this model
EndUserDocs */

/**
* @brief Base class implementing common properties for e-prop synapses with additional biological features.
*
* Base class implementing common properties for the e-prop synapse model according to Bellec et al. (2020) with
* additional biological features described in Korcsak-Gorzo, Stapmanns, and Espinoza Valverde et al.
* (in preparation).
Expand Down Expand Up @@ -197,6 +199,8 @@ class EpropSynapseCommonProperties : public CommonSynapseProperties
void register_eprop_synapse( const std::string& name );

/**
* @brief Class implementing a synapse model for e-prop plasticity with additional biological features.
*
* Class implementing a synapse model for e-prop plasticity according to Bellec et al. (2020) with
* additional biological features described in Korcsak-Gorzo, Stapmanns, and Espinoza Valverde et al. (in preparation).
*
Expand Down
4 changes: 4 additions & 0 deletions models/eprop_synapse_bsshslm_2020.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ Examples using this model
EndUserDocs */

/**
* @brief Base class implementing common properties for e-prop synapses.
*
* Base class implementing common properties for the e-prop synapse model according to Bellec et al. (2020).
*
* This class in particular manages a pointer to weight-optimizer common properties to support
Expand Down Expand Up @@ -210,6 +212,8 @@ class EpropSynapseBSSHSLM2020CommonProperties : public CommonSynapseProperties
void register_eprop_synapse_bsshslm_2020( const std::string& name );

/**
* @brief Class implementing a synapse model for e-prop plasticity.
*
* Class implementing a synapse model for e-prop plasticity according to Bellec et al. (2020).
*
* @note Several aspects of this synapse are in place to reproduce the Tensorflow implementation of Bellec et al.
Expand Down
4 changes: 2 additions & 2 deletions nestkernel/eprop_archiving_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ EpropArchivingNodeRecurrent::write_firing_rate_reg_to_history( const long t_curr
}

void
EpropArchivingNodeRecurrent::write_firing_rate_reg_to_history( const long t,
EpropArchivingNodeRecurrent::write_firing_rate_reg_to_history( const long time_step,
const double z,
const double f_target,
const double kappa_reg,
Expand All @@ -230,7 +230,7 @@ EpropArchivingNodeRecurrent::write_firing_rate_reg_to_history( const long t,

firing_rate_reg_ = c_reg * ( f_av_ - f_target_ );

auto it_hist = get_eprop_history( t );
auto it_hist = get_eprop_history( time_step );
it_hist->firing_rate_reg_ = firing_rate_reg_;
}

Expand Down
Loading
Loading