2D RepresentationΒΆ

Purpose: This demo shows how to construct and manipulate a population of 2D neurons.

Comments: These are 100 leaky integrate-and-fire (LIF) neurons. The neuron tuning properties have been randomly selected to encode a 2D space (i.e. each neuron has an encoder randomly selected from the unit circle).

Usage: Grab the slider controls and move then up and down to see the effects of shifting the input throughout the 2D space. As a population, these neurons do a good job of representing a 2D vector value. This can be seen by the fact that the input graph and neurons graphs match well.

Output: See the screen capture below. The ‘circle’ plot is showing the preferred direction vector of each neuron multplied by its firing rate. This kind of plot was made famous by Georgoupolos et al.

../_images/2drepresentation.png
Code:
import nef

net=nef.Network('2D Representation') #Create the network object
input=net.make_input('input',[0,0]) #Create a controllable input function 
                                    #with a starting value of 0 and 0 in 
                                    #the two dimensions
neuron=net.make('neurons',100,2,quick=True) #Make a population with 100 
                                            #neurons, 2 dimensions
net.connect(input,neuron) #Connect the input object to the neuron object, 
                          #with an identity matrix by default
net.add_to_nengo()

Nengo User Manual

Table Of Contents

This Page