tutorials:writing_your_own_plasticity_model
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorials:writing_your_own_plasticity_model [2015/06/10 17:01] – zenke | tutorials:writing_your_own_plasticity_model [2017/04/24 19:15] – Changes links to fzenke.net zenke | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | **Please note,** this is only a tentative draft version. | ||
- | |||
- | |||
====== Synapse and Plasticity Models ====== | ====== Synapse and Plasticity Models ====== | ||
Line 13: | Line 10: | ||
{{ : | {{ : | ||
- | In Auryn you can implement this type of learning rule very intuitively if the '' | + | In Auryn you can implement this type of learning rule very intuitively if the '' |
Line 20: | Line 17: | ||
===== Understanding plasticity in Auryn ===== | ===== Understanding plasticity in Auryn ===== | ||
- | Before writing | + | In most cases you will want to use Auryn to implement |
- | + | ||
- | In most cases it will be best to writing your own synapse model, by modifying an existing model (like [[examples:sim_background|Triplet STDP]]) which already | + | |
Line 42: | Line 37: | ||
The macros '' | The macros '' | ||
- | This declaration should be matched in the '' | + | This declaration should be matched in the '' |
<code c++> | <code c++> | ||
/* Initialization of presynaptic traces */ | /* Initialization of presynaptic traces */ | ||
Line 52: | Line 47: | ||
tr_post_hom = dst-> | tr_post_hom = dst-> | ||
</ | </ | ||
- | which initializes the traces using their respective | + | which initializes the traces using their respective |
- | + | ||
- | The current value of a trace can then be accessed in the code via '' | + | |
==== Weight updates at spiking events (propagate) ==== | ==== Weight updates at spiking events (propagate) ==== | ||
- | The code described in the previous section ensures that you have a bunch of pre- and postsynaptic traces at your hands, but it does not implement any weight update. To do so you will have to implement the function '' | + | The code described in the previous section ensures that you have a bunch of pre- and postsynaptic traces at your hands, but it does not implement any weight update. To do so you will have to implement the function '' |
<code c++> | <code c++> | ||
void TripletConnection:: | void TripletConnection:: | ||
Line 118: | Line 111: | ||
return dw; | return dw; | ||
</ | </ | ||
- | The code describes how each weight should be updated upon a presynaptic spike (hence the suffix). Since spikes in Auryn are labelled | + | The code describes how each weight should be updated upon a presynaptic spike (hence the suffix). Since spikes in Auryn are labeled |
The complete weight update '' | The complete weight update '' | ||
- | This describes | + | One thing you should pay close attention to, because it could might easily introduce errors: **You need to translate postsynaptic IDs (as shown above)**, but not the presynaptic ones! Copies of presynaptic trances are available on each rank, whereas postsynaptic traces are distributed with the neuronal dynamics. This only makes a difference when you are running simulations in parallel with MPI, but then it's an important difference. |
+ | |||
+ | We now covered weight updates triggered by presynaptic spikes, but what happens upon a postsynaptic spike? | ||
=== Backward spike propagation === | === Backward spike propagation === | ||
Line 175: | Line 171: | ||
===== Changing the plasticity model ===== | ===== Changing the plasticity model ===== | ||
- | Suppose, you would like to change the plasticity model, all you need to do is to copy TripletConnection.h and TripletConnection.cpp to YourNameConnection.h and .cpp and then the '' | + | Most of the plasticity models in Auryn follow the design principles introduced above (e.g. http:// |
- | One thing you should pay attention to, because it could might easily introduce errors: You need to translate postsynaptic IDs (as shown above), but not the presynaptic ones! Copies of presynaptic trances are integrated on each rank; that sounds inefficient, | ||
==== Weight updates in continuous time (evolve) ==== | ==== Weight updates in continuous time (evolve) ==== |
tutorials/writing_your_own_plasticity_model.txt · Last modified: 2018/02/07 23:11 by zenke