This blog is for notes on how to use the Nengo spiking neuron modeling system

Thursday, June 23, 2011

storing vectors

To store a vector in a net the net has to feedback on itself. That is it constantly adds to itself what it just had. Multiple vectors can be added to this type of net, that is, added to the vector represented in the net. To maintain what was represented before the new vector cannot be added too quickly, this is controlled by weight of the connection. There is an interplay between the weight, the number of neurons, and the number of dimensions. The weight of the feedback loop also has an effect, if it is less than 1 it will cause a decay

Here is an example of a memory system that stores a representation of cat, mouse, and dog (use "set value" by clicking on the sematic pointer graph to change the input

import nef

import hrr
vocab=hrr.Vocabulary(128)
vocab.parse('cat,dog,mouse')

net=nef.Network('Test Network',quick=True) # quick=true, if you have created these neurons in the past just re-use


input1=net.make_input('input1',values=vocab.parse('cat').v)

A=net.make_array('A',neurons=30,dimensions=1,length=128)
B=net.make_array('B',neurons=500,dimensions=8,length=16)

net.connect(input1,A)
net.connect(A,B,weight=0.1)
net.connect(B,B)

net.add_to(world)
#put this here, then when the network appears you know its finished loading

No comments:

Post a Comment