Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
STDPwdConnection.h
Go to the documentation of this file.
1 /*
2 * Copyright 2014-2018 Friedemann Zenke
3 *
4 * This file is part of Auryn, a simulation package for plastic
5 * spiking neural networks.
6 *
7 * Auryn is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * Auryn is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with Auryn. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * If you are using Auryn or parts of it for your work please cite:
21 * Zenke, F. and Gerstner, W., 2014. Limits to high-speed simulations
22 * of spiking neural networks using general-purpose computers.
23 * Front Neuroinform 8, 76. doi: 10.3389/fninf.2014.00076
24 */
25 
26 #ifndef STDPWDCONNECTION_H_
27 #define STDPWDCONNECTION_H_
28 
29 #include "auryn_definitions.h"
30 #include "AurynVector.h"
31 #include "DuplexConnection.h"
32 #include "EulerTrace.h"
33 #include "LinearTrace.h"
34 #include "SpikeDelay.h"
35 
36 
37 namespace auryn {
38 
39 
48 {
49 
50 private:
51  AurynWeight learning_rate;
52 
53  AurynWeight param_lambda;
54  AurynWeight param_alpha;
55 
56  AurynWeight param_mu_plus;
57  AurynWeight param_mu_minus;
58 
59  void init(AurynWeight lambda, AurynWeight maxweight);
60  void init_shortcuts();
61 
62 protected:
63 
66 
69 
72 
75 
76 
79 
80 
81  void propagate_forward();
82  void propagate_backward();
83 
84  void compute_fudge_factors();
85 
86 public:
87 
89 
90  STDPwdConnection(SpikingGroup * source, NeuronGroup * destination,
91  TransmitterType transmitter=GLUT);
92 
93  STDPwdConnection(SpikingGroup * source, NeuronGroup * destination,
94  const char * filename,
95  AurynWeight lambda=1e-5,
96  AurynWeight maxweight=0.1 ,
97  TransmitterType transmitter=GLUT);
98 
99  STDPwdConnection(SpikingGroup * source, NeuronGroup * destination,
100  AurynWeight weight, AurynWeight sparseness=0.05,
101  AurynWeight lambda=0.01,
102  AurynWeight maxweight=100. ,
103  TransmitterType transmitter=GLUT,
104  string name = "STDPwdConnection" );
105 
106  void set_alpha(AurynWeight a);
107  void set_lambda(AurynWeight l);
108 
109  void set_mu_plus(AurynWeight m);
110  void set_mu_minus(AurynWeight m);
111 
113 
114  virtual ~STDPwdConnection();
115  virtual void finalize();
116  void free();
117 
118  virtual void propagate();
119  virtual void evolve();
120 
121 };
122 
123 }
124 
125 #endif /*STDPWDCONNECTION_H_*/
bool stdp_active
Definition: STDPwdConnection.h:88
AurynWeight ** bkw_data
Definition: STDPwdConnection.h:71
AurynWeight tau_plus
Definition: STDPwdConnection.h:64
Standard Glutamatergic (excitatory) transmission.
Definition: auryn_definitions.h:139
void set_alpha(AurynWeight a)
Definition: STDPwdConnection.cpp:172
NeuronID * fwd_ind
Definition: STDPwdConnection.h:67
void set_mu_plus(AurynWeight m)
Definition: STDPwdConnection.cpp:186
ForwardMatrix * w
A pointer that points per default to the ComplexMatrix that stores the connectinos.
Definition: SparseConnection.h:147
AurynWeight * fwd_data
Definition: STDPwdConnection.h:68
Abstract base class of all objects producing spikes.
Definition: SpikingGroup.h:67
void propagate_forward()
Definition: STDPwdConnection.cpp:125
NeuronID * bkw_ind
Definition: STDPwdConnection.h:70
AurynFloat AurynWeight
Unit of synaptic weights.
Definition: auryn_definitions.h:159
Abstract base class of synaptic traces.
Definition: Trace.h:36
void propagate_backward()
Definition: STDPwdConnection.cpp:151
virtual void evolve()
Evolve method to update internal connection state. Called by System run method.
Definition: STDPwdConnection.cpp:212
AurynWeight fudge_pot
Definition: STDPwdConnection.h:77
Definition: ABSConnection.h:38
AurynWeight tau_minus
Definition: STDPwdConnection.h:65
void set_mu_minus(AurynWeight m)
Definition: STDPwdConnection.cpp:193
void set_lambda(AurynWeight l)
Definition: STDPwdConnection.cpp:179
virtual ~STDPwdConnection()
Definition: STDPwdConnection.cpp:118
virtual void finalize()
Finalizes connection after random or manual initialization of the weights.
Definition: STDPwdConnection.cpp:72
Trace * tr_pre
Definition: STDPwdConnection.h:73
TransmitterType
Specifies the different transmitter types that Auryn knows.
Definition: auryn_definitions.h:138
Doublet STDP All-to-All as implemented in NEST as stdp_synapse_hom.
Definition: STDPwdConnection.h:47
void free()
Definition: STDPwdConnection.cpp:77
virtual void propagate()
Internally used propagate method.
Definition: STDPwdConnection.cpp:206
void compute_fudge_factors()
Definition: STDPwdConnection.cpp:54
Abstract base class for all neuron groups.
Definition: NeuronGroup.h:45
STDPwdConnection(SpikingGroup *source, NeuronGroup *destination, TransmitterType transmitter=GLUT)
Definition: STDPwdConnection.cpp:81
void set_max_weight(AurynWeight w)
Sets maximum weight (for plastic connections).
Definition: STDPwdConnection.cpp:200
AurynWeight fudge_dep
Definition: STDPwdConnection.h:78
Duplex connection is the base class of most plastic connections.
Definition: DuplexConnection.h:54
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151
Trace * tr_post
Definition: STDPwdConnection.h:74