tutorials:multiple_synaptic_state_variables
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
tutorials:multiple_synaptic_state_variables [2014/12/15 08:21] – created zenke | tutorials:multiple_synaptic_state_variables [2015/02/09 10:02] – [Tutorial: Multiple Synaptic State Variables] zenke | ||
---|---|---|---|
Line 2: | Line 2: | ||
Let's assume you would like to write a plasticity model in which induced changes to a synapse require some time to percolate through. Consider that inserting for instance additional AMPA receptors into a postsynaptic density takes time... | Let's assume you would like to write a plasticity model in which induced changes to a synapse require some time to percolate through. Consider that inserting for instance additional AMPA receptors into a postsynaptic density takes time... | ||
+ | |||
+ | **Update** As of Auryn 0.5 synapse models with multiple states can be implemented more easily using synaptic state vectors -- see for [[examples: | ||
+ | |||
===== Aims ===== | ===== Aims ===== | ||
- | Our aim is to introduce a meta-variable '' | + | Our aim is to introduce a meta-variable '' |
- | ===== Overview and Steps ===== | + | ===== Walk-through |
To achieve our aim we will base this tutorial on the [[manual: | To achieve our aim we will base this tutorial on the [[manual: | ||
- We will copy and rename '' | - We will copy and rename '' | ||
- | - We will then insert a second [[manual: | + | - We will then insert a second [[manual: |
- | - All plasticity related STDP call will then be refined | + | - We will then modify the propagate function |
- | - Finally we will implement an '' | + | - Finally we will implement an '' |
- | + | ||
- | ===== Walk-through ===== | + | |
Line 29: | Line 30: | ||
Once the files are copied, open them in your preferred browser and replace all occurrences of '' | Once the files are copied, open them in your preferred browser and replace all occurrences of '' | ||
- | Now is generally a good time to start updating the doxygen | + | Now is generally a good time to start updating the Doxygen |
+ | |||
+ | |||
+ | ==== Adding a second SimpleMatrix container ==== | ||
+ | |||
+ | To store synaptic weights Auryn uses the class [[manual: | ||
+ | |||
+ | First add the following line to the private variable declarations in the newly created header (.h) file | ||
+ | <code cpp> | ||
+ | private: | ||
+ | ForwardMatrix * lpw; | ||
+ | </ | ||
+ | Then open the .cpp file and find the function '' | ||
+ | <code cpp> | ||
+ | lpw = new ForwardMatrix ( w ); | ||
+ | </ | ||
+ | This tells Auryn to create a matrix and clone all its properties (such as dimensions, sparseness, etc) from '' | ||
+ | <code cpp> | ||
+ | delete lpw; | ||
+ | </ | ||
+ | |||
+ | You have now created and allocated an object which will house your variable '' | ||
+ | |||
+ | |||
+ | ==== Modify STDP/ | ||
+ | |||
+ | Since in [[manual: | ||
+ | <code cpp> | ||
+ | AurynWeight value = fwd_data[c-fwd_ind]; | ||
+ | transmit( *c , value ); | ||
+ | </ | ||
+ | What happens here is the following: '' | ||
+ | <code cpp> | ||
+ | AurynWeight value = lpw-> | ||
+ | transmit( *c , value ); | ||
+ | </ | ||
+ | |||
+ | This change will now propagate weights stored in '' | ||
+ | |||
+ | ==== Implementing the evolve function to do the low-pass filtering ==== | ||
+ | |||
+ | So far the values stored in '' | ||
+ | <code cpp> | ||
+ | AurynFloat tau_lp; | ||
+ | AurynFloat delta_lp; | ||
+ | AurynTime timestep_lp; | ||
+ | </ | ||
+ | just below the definition of '' | ||
+ | |||
+ | Then at the end of '' | ||
+ | <code cpp> | ||
+ | tau_lp = 120; | ||
+ | timestep_lp = 1e-3*tau_lp/ | ||
+ | delta_lp = 1.0*timestep_lp/ | ||
+ | </ | ||
+ | Here '' | ||
+ | |||
+ | Now find the function '' | ||
+ | <code cpp> | ||
+ | if ( sys-> | ||
+ | for (AurynLong i = 0 ; i < lpw-> | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | which now implements the low-pass filter. Importantly, |
tutorials/multiple_synaptic_state_variables.txt · Last modified: 2016/08/18 16:58 by zenke