Auryn simulator  v0.8.1-206-gb56e451
Plastic Spiking Neural Network Simulator
TripletScalingConnection.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 
21 #ifndef TRIPLETSCALINGCONNECTION_H_
22 #define TRIPLETSCALINGCONNECTION_H_
23 
24 #include "auryn_definitions.h"
25 #include "AurynVector.h"
26 #include "DuplexConnection.h"
27 #include "Trace.h"
28 
29 #define TRIPLETSCALINGCONNECTION_EULERUPGRADE_STEP 0.001
30 
31 
32 namespace auryn {
34  {
35 
36  private:
37  void init(AurynFloat tau_hom, AurynFloat eta, AurynFloat kappa, AurynFloat beta, AurynFloat maxweight);
38  void init_shortcuts();
39 
40  virtual AurynWeight get_hom(NeuronID i);
41 
42  protected:
43 
47 
49 
53 
56 
59 
62 
67 
68  void propagate_forward();
69  void propagate_backward();
70  inline void evolve_scaling();
71  void sort_spikes();
72 
75 
76  public:
78 
81 
82 
83 
85 
86  TripletScalingConnection(SpikingGroup * source, NeuronGroup * destination,
87  TransmitterType transmitter=GLUT);
88 
89  TripletScalingConnection(SpikingGroup * source, NeuronGroup * destination,
90  const char * filename,
91  AurynFloat tau_hom=10,
92  AurynFloat eta=1,
93  AurynFloat kappa=3.,
94  AurynFloat beta=1.0, // TODO put sensical number
95  AurynFloat maxweight=1. ,
96  TransmitterType transmitter=GLUT);
97 
98  TripletScalingConnection(SpikingGroup * source, NeuronGroup * destination,
99  AurynWeight weight, AurynFloat sparseness=0.05,
100  AurynFloat tau_hom=10,
101  AurynFloat eta=1,
102  AurynFloat kappa=3.,
103  AurynFloat beta=1.0, // TODO put sensical number
104  AurynFloat maxweight=1. ,
105  TransmitterType transmitter=GLUT,
106  string name = "TripletScalingConnection" );
107 
108  virtual ~TripletScalingConnection();
109  virtual void finalize();
110  void free();
111 
112  void set_min_weight(AurynWeight min);
113  void set_max_weight(AurynWeight max);
114  void set_hom_trace(AurynFloat freq);
115  void set_beta(AurynFloat beta);
116 
118 
119  virtual void propagate();
120  virtual void evolve();
121 
122  };
123 }
124 
125 #endif /*TRIPLETSCALINGCONNECTION_H_*/
virtual void propagate()
Internally used propagate method.
Definition: TripletScalingConnection.cpp:187
void set_min_weight(AurynWeight min)
Sets minimum weight (for plastic connections).
Definition: TripletScalingConnection.cpp:198
Standard Glutamatergic (excitatory) transmission.
Definition: auryn_definitions.h:139
NeuronID * fwd_ind
Definition: TripletScalingConnection.h:54
NeuronID * bkw_ind
Definition: TripletScalingConnection.h:57
AurynFloat tau_minus
Definition: TripletScalingConnection.h:45
bool stdp_active
Definition: TripletScalingConnection.h:84
Abstract base class of all objects producing spikes.
Definition: SpikingGroup.h:67
AurynDouble target_rate
Definition: TripletScalingConnection.h:61
double AurynDouble
Higher precision floating point datatype.
Definition: auryn_definitions.h:158
AurynFloat tau_homeostatic
Definition: TripletScalingConnection.h:48
AurynFloat AurynWeight
Unit of synaptic weights.
Definition: auryn_definitions.h:159
AurynFloat w_max
Definition: TripletScalingConnection.h:80
Abstract base class of synaptic traces.
Definition: Trace.h:36
Trace * tr_post
Definition: TripletScalingConnection.h:64
AurynFloat tau_plus
Definition: TripletScalingConnection.h:44
Definition: ABSConnection.h:38
AurynFloat scal_beta
Definition: TripletScalingConnection.h:51
virtual ~TripletScalingConnection()
Definition: TripletScalingConnection.cpp:117
TransmitterType
Specifies the different transmitter types that Auryn knows.
Definition: auryn_definitions.h:138
AurynWeight get_wmin()
Definition: TripletScalingConnection.cpp:208
float AurynFloat
Low precision floating point datatype.
Definition: auryn_definitions.h:157
Trace * tr_pre
Definition: TripletScalingConnection.h:63
void set_hom_trace(AurynFloat freq)
Definition: TripletScalingConnection.cpp:123
AurynTime scal_timestep
Definition: TripletScalingConnection.h:50
AurynDouble hom_fudge
Definition: TripletScalingConnection.h:60
virtual void finalize()
Finalizes connection after random or manual initialization of the weights.
Definition: TripletScalingConnection.cpp:67
void set_beta(AurynFloat beta)
Definition: TripletScalingConnection.cpp:254
AurynFloat tau_long
Definition: TripletScalingConnection.h:46
TripletScalingConnection(SpikingGroup *source, NeuronGroup *destination, TransmitterType transmitter=GLUT)
Definition: TripletScalingConnection.cpp:76
Definition: TripletScalingConnection.h:33
void propagate_forward()
Definition: TripletScalingConnection.cpp:153
Abstract base class for all neuron groups.
Definition: NeuronGroup.h:45
AurynWeight ** bkw_data
Definition: TripletScalingConnection.h:58
Trace * tr_post_hom
Definition: TripletScalingConnection.h:66
AurynFloat A3_plus
Definition: TripletScalingConnection.h:77
void set_max_weight(AurynWeight max)
Sets maximum weight (for plastic connections).
Definition: TripletScalingConnection.cpp:203
AurynWeight dw_post(NeuronID pre, NeuronID post)
Definition: TripletScalingConnection.cpp:144
AurynWeight dw_pre(NeuronID post)
Definition: TripletScalingConnection.cpp:136
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
Trace * tr_post2
Definition: TripletScalingConnection.h:65
AurynWeight * fwd_data
Definition: TripletScalingConnection.h:55
void free()
Definition: TripletScalingConnection.cpp:72
Duplex connection is the base class of most plastic connections.
Definition: DuplexConnection.h:54
AurynFloat scal_mul
Definition: TripletScalingConnection.h:52
AurynFloat w_min
Definition: TripletScalingConnection.h:79
void propagate_backward()
Definition: TripletScalingConnection.cpp:171
virtual void evolve()
Evolve method to update internal connection state. Called by System run method.
Definition: TripletScalingConnection.cpp:193
unsigned int NeuronID
NeuronID is an unsigned integeger type used to index neurons in Auryn.
Definition: auryn_definitions.h:151
void evolve_scaling()
Definition: TripletScalingConnection.cpp:213