tutorials:old_complex_synapse_tutorial
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | tutorials:old_complex_synapse_tutorial [2016/08/18 17:00] (current) – created zenke | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Implementing multiple synaptic states (the old way) ====== | ||
| + | Note, that starting with Auryn v0.7 there is a new (and better way) of dealing with [[multiple synaptic state variables]]. | ||
| + | |||
| + | ===== Aims ===== | ||
| + | |||
| + | Our aim is to introduce a meta-variable '' | ||
| + | |||
| + | ===== Walk-through ===== | ||
| + | |||
| + | To achieve our aim we will base this tutorial on the [[manual: | ||
| + | - We will copy and rename '' | ||
| + | - We will then insert a second [[manual: | ||
| + | - We will then modify the propagate function to propagate '' | ||
| + | - Finally we will implement an '' | ||
| + | |||
| + | |||
| + | ==== Copying TripletSTDPConnection source files ==== | ||
| + | |||
| + | To prepare our new class we start by navigating to Auryn' | ||
| + | |||
| + | <code shell> | ||
| + | zenke@cashew: | ||
| + | zenke@cashew: | ||
| + | </ | ||
| + | |||
| + | 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 string in the header file just above the keyword '' | ||
| + | |||
| + | |||
| + | ==== 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/old_complex_synapse_tutorial.txt · Last modified: 2016/08/18 17:00 by zenke
