tutorials:multiple_synaptic_state_variables
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
tutorials:multiple_synaptic_state_variables [2015/02/09 10:02] – [Tutorial: Multiple Synaptic State Variables] zenke | tutorials:multiple_synaptic_state_variables [2016/08/18 16:58] (current) – Removes old tutorial zenke | ||
---|---|---|---|
Line 6: | Line 6: | ||
- | ===== Aims ===== | + | I still owe a tutorial for that here. The [[old complex synapse tutorial]] can be found here which describes |
- | + | ||
- | Our aim is to introduce | + | |
- | + | ||
- | ===== Walk-through ===== | + | |
- | + | ||
- | To achieve our aim we will base this tutorial | + | |
- | - 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 | + | |
- | <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