Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
LPTripletConnection.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 LPTRIPLETCONNECTION_H_
27 #define LPTRIPLETCONNECTION_H_
28 
29 #include "auryn_definitions.h"
30 #include "AurynVector.h"
31 #include "DuplexConnection.h"
32 #include "EulerTrace.h"
33 #include "SpikeDelay.h"
34 
35 namespace auryn {
36 
37 
41 {
42 
43 private:
45  template<class Archive>
46  void save(Archive & ar, const unsigned int version) const
47  {
48  ar & boost::serialization::base_object<DuplexConnection>(*this);
49  }
50  template<class Archive>
51  void load(Archive & ar, const unsigned int version)
52  {
53  ar & boost::serialization::base_object<DuplexConnection>(*this);
54  finalize();
55  }
56  BOOST_SERIALIZATION_SPLIT_MEMBER()
57 
58  AurynFloat tau_lp;
59  AurynFloat delta_lp;
60  AurynTime timestep_lp;
61 
62  void init(AurynFloat tau_hom, AurynFloat eta, AurynFloat kappa, AurynFloat maxweight);
63  void init_shortcuts();
64 
65  virtual AurynWeight get_hom(NeuronID i);
66 
67 protected:
68 
72 
74 
77 
80 
82 
83  /* Definitions of presynaptic traces */
85 
86  /* Definitions of postsynaptic traces */
90 
91 
92  // temporary state vector
94 
95  void propagate_forward();
96  void propagate_backward();
97 
103 
111 
112 public:
114 
115 
118 
119  LPTripletConnection(SpikingGroup * source, NeuronGroup * destination,
120  TransmitterType transmitter=GLUT);
121 
122  LPTripletConnection(SpikingGroup * source, NeuronGroup * destination,
123  const char * filename,
124  AurynFloat tau_hom=10,
125  AurynFloat eta=1,
126  AurynFloat kappa=3., AurynFloat maxweight=1. ,
127  TransmitterType transmitter=GLUT);
128 
140  LPTripletConnection(SpikingGroup * source, NeuronGroup * destination,
141  AurynWeight weight, AurynFloat sparseness=0.05,
142  AurynFloat tau_hom=10,
143  AurynFloat eta=1,
144  AurynFloat kappa=3., AurynFloat maxweight=1. ,
145  TransmitterType transmitter=GLUT,
146  string name = "LPTripletConnection" );
147 
148  virtual ~LPTripletConnection();
149  virtual void finalize();
150  void free();
151 
152  void set_hom_trace(AurynFloat freq);
153 
154  virtual void propagate();
155  virtual void evolve();
156 
157 };
158 
159 }
160 
161 #endif /*LPTRIPLETCONNECTION_H_*/
Implements triplet STDP in which weight updates are low-pass filtered.
Definition: LPTripletConnection.h:40
virtual void finalize()
Finalizes connection after random or manual initialization of the weights.
Definition: LPTripletConnection.cpp:80
AurynFloat tau_homeostatic
Definition: LPTripletConnection.h:73
Standard Glutamatergic (excitatory) transmission.
Definition: auryn_definitions.h:139
NeuronID * bkw_ind
Definition: LPTripletConnection.h:78
AurynFloat tau_minus
Definition: LPTripletConnection.h:70
Abstract base class of all objects producing spikes.
Definition: SpikingGroup.h:67
double AurynDouble
Higher precision floating point datatype.
Definition: auryn_definitions.h:158
AurynFloat AurynWeight
Unit of synaptic weights.
Definition: auryn_definitions.h:159
AurynFloat A3_plus
Definition: LPTripletConnection.h:113
NeuronID * fwd_ind
Definition: LPTripletConnection.h:75
Abstract base class of synaptic traces.
Definition: Trace.h:36
AurynWeight ** bkw_data
Definition: LPTripletConnection.h:79
void set_hom_trace(AurynFloat freq)
Definition: LPTripletConnection.cpp:133
bool stdp_active
Definition: LPTripletConnection.h:117
Trace * tr_post_hom
Definition: LPTripletConnection.h:89
void propagate_forward()
Definition: LPTripletConnection.cpp:167
Definition: ABSConnection.h:38
AurynWeight * fwd_data
Definition: LPTripletConnection.h:76
AurynFloat tau_long
Definition: LPTripletConnection.h:71
Trace * tr_post2
Definition: LPTripletConnection.h:88
friend class boost::serialization::access
Definition: LPTripletConnection.h:44
TransmitterType
Specifies the different transmitter types that Auryn knows.
Definition: auryn_definitions.h:138
float AurynFloat
Low precision floating point datatype.
Definition: auryn_definitions.h:157
Trace * tr_pre
Definition: LPTripletConnection.h:84
Trace * tr_post
Definition: LPTripletConnection.h:87
void propagate_backward()
Definition: LPTripletConnection.cpp:197
AurynDouble hom_fudge
Definition: LPTripletConnection.h:81
AurynFloat tau_plus
Definition: LPTripletConnection.h:69
Abstract base class for all neuron groups.
Definition: NeuronGroup.h:45
AurynWeight dw_post(NeuronID pre, NeuronID post)
Definition: LPTripletConnection.cpp:158
virtual void propagate()
Internally used propagate method.
Definition: LPTripletConnection.cpp:229
AurynWeight dw_pre(NeuronID post)
Definition: LPTripletConnection.cpp:148
NeuronID AurynTime
Defines Auryns discrete time unit of the System clock. Change to AurynLong if 120h of simtime are not...
Definition: auryn_definitions.h:155
void free()
Definition: LPTripletConnection.cpp:85
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
virtual void evolve()
Evolve method to update internal connection state. Called by System run method.
Definition: LPTripletConnection.cpp:235
AurynWeight * temp_state
Definition: LPTripletConnection.h:93