Skip to content
This repository was archived by the owner on Jan 27, 2023. It is now read-only.

Setting up network weights

Antonio Ulloa edited this page Jun 8, 2016 · 1 revision

The following example shows the first few lines of a network connection specifications (taken from mgnsea1d.w, a file containing connection weights between MGN and the excitatory part of down-selective Ai of the sequences memory model):

Connect(mgns, ea1d)  {
  From:  (1, 1)  {
    ([ 1,81]  0.047928)     ([ 1, 1]  0.099059)     |              | 
}

This example file of specification of connection weights was generated by the script netgen.py. The script netgen.py takes a *.ws file and generates the connection code. The original file of corresponding to the connections above is mgnsea1d.ws, which contains the following lines:

mgns ea1d SV I(1 81) O(1 81) F(1 3) 0 0.0 Offset: 0 0
0.05:0.003 0.10:0.002 0.00:0.002

The first two strings in this file, mgns and ea1d, represent the two modules between which the weights are being defined, that is, MGN and Ai excitatory down-selective module. S indicates that the fanout weights will be specified in the current weights file. Other options are R and A. The R option allows to specify that random weights will be generated. The A option allows to specify that absolute weights positions will be used. The symbol V after the S indicates a verbose output.

The expressions I(1 81), O(1 81), and F(1 3) specify the input set size, output set size, and fanout size, respectively. In the above example, a fanout size of 1 to 3 was specified, which means that each unit of MGNs will be connected to 3 units in EAid. The connections from the MGN module will made from the current unit to the corresponding unit in the EAid module and to the 2 nearest neighbors of that unit. The next two numbers in the first row are the seed and pctzero (0 and 0.0 in the example above) and the offset (0 in the example above but never implemented).

The weights of the connections are the numbers in the second row of the file (scale:base). Accordingly, 0.05:0.003 specifies that the first of those weights will equal 0.05 +- 0.003. The second weight, 0.10:0.002, represents a connection weight of 0.10 +- 0.002. The third weight, 0.00:0.002, represents connection weights of 0.00 to 0.002. The small variations around the specified weight values are made by addition of bounded random noise.

Finally, note that the only way to specify whether a module in the network is inhibitory, is by setting its connecting weights to other modules to negative values.

Clone this wiki locally