manual:sparseconnection
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
manual:sparseconnection [2013/10/10 07:42] – created zenke | manual:sparseconnection [2013/11/01 15:57] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | SparseConnections are used to connect neuron groups with static synapses that are generally initialized randomly with sparse entries, but the connection can just as well be loaded from a [[wmat]] file. A standard call to the class might look like the following | + | ====== The Sparse Connection Class ====== |
+ | |||
+ | SparseConnections are used to connect neuron groups with static synapses that are generally initialized randomly with sparse entries. The connection can just as well be loaded from a [[wmat]] | ||
+ | |||
+ | ===== Initializing with random sparse connectivity ===== | ||
+ | |||
+ | A standard call to the class might look like the following | ||
<code cpp> | <code cpp> | ||
- | SparseConnection * con_ie = new SparseConnection(neurons_i,neurons_e, | + | SparseConnection(SpikingGroup * source, |
- | w_ie, | + | NeuronGroup * destination, |
+ | | ||
+ | AurynFloat | ||
+ | TransmitterType transmitter=GLUT, | ||
+ | string name=" | ||
</ | </ | ||
- | where the '' | + | where the '' |
+ | ===== Initializing connections from a file ===== | ||
+ | |||
+ | SparseConnection has another constructor that allows to initialize the connection matrix directly from a file. | ||
+ | <code cpp> | ||
+ | SparseConnection(SpikingGroup * source, | ||
+ | NeuronGroup * destination, | ||
+ | const char * filename, | ||
+ | TransmitterType transmitter=GLUT); | ||
+ | </ | ||
+ | Instead of the arguments '' | ||
+ | |||
+ | ===== Loading patterns ===== | ||
+ | |||
+ | Patterns can be loaded from a [[pat]] file to an existing weight matrix. Here is an example: | ||
+ | <code cpp> | ||
+ | SparseConnection * con_ee = new SparseConnection(neurons_e, | ||
+ | con_ee-> | ||
+ | </ | ||
+ | In this example first the connection object '' | ||
+ | |||
+ | The full method is the following | ||
+ | <code cpp> | ||
+ | void load_patterns( string filename, AurynWeight strength, bool overwrite = false, bool chainmode = false); | ||
+ | void load_patterns( string filename, AurynWeight strength, int n, bool overwrite = false, bool chainmode = false); | ||
+ | </ | ||
+ | where the filename always specifies the full path to the [[pat]] file. strength signifies the amount by which the weights (given the connections exists is increased) if '' | ||
+ | |||
+ | '' |
manual/sparseconnection.txt · Last modified: 2013/11/01 15:57 by 127.0.0.1