AXTut BuildNet

From emergent
Jump to: navigation, search
← back to AX Tutorial main page AX Tutorial → next InputData

NOTE: Within emergent, you can return to this document by selecting docs → BuildNet in the left browser panel).

Rename the Project

Before we start it's a good idea to save the project we'll be working on to distinguish it from the essentially empty project that we are starting from. In the toolbar along the top of the project window select Save As and rename the project we'll be building ax_tutorial_working.proj.

Building a Network

The wizard makes it easy to create a network. It is located in the wizards section of the left browser panel, and can always be found in the LeabraWizard_0 tab which is pinned to the top of this middle Editor panel. Before we start, go down to the bottom of the Navigator tree (left panel) and check if there is already an empty network listed there under the networks section. If so, make sure that it is named "Network_1" since that's how this tutorial will refer to the network we build from now on. If it is named something different (e.g., "Network_0"), click on it in the Navigator tree and edit its name field in the raspberry-colored panel that appears in the middle Editor area. If none was listed, you should do this re-naming step after running the wizard in the next step, again making sure the name of the network is "Network_1".

Click the Standard Network link in the wizard (under Standard Everything or under Networks) (this link here: StdNetwork will run it for you too -- convenient for seeing the table below while the wizard dialog is open). This will pop up a dialog box showing the network name and asking for the number of layers (N_Layers:) you want your network to have. We are going to create a simple 3 layer network so leave it at the default value of 3 and hit ok.

The next screen shows a table with the names of the layers, the type of layer, the layer sizes and their dimensions (Size_X, Size_Y; along with the other layers from which each one will receive connections (RecvPrjns). To get further information about each column you can mouse over the headings. For this network, you should enter dimensions as follows:

Layer Size_X Size_YUnitGps_XUnitGps_YRecv Prjns
Input 3 200
Hidden 4 400Input Output
Output 2 100Hidden

This will create a network with 6 input units, 16 hidden units and 2 output units. Since we are making a bidirectionally connected network the input layer should not receive any connections, the hidden layer should receive from both the input and the output and the output layer should receive only from the hidden layer. When you can set everything up hit OK. In the left Navigator tree edit to make sure our new network is named "Network_1".

You will see a network appear in the right Visualizer panel (replacing Frame1). If it's not named "Network_1", Context-click on the tab and select Panel Properties..., then change the name field in the edit window that pops up to read to Network_1, click the Apply button towards the bottom right, then close the pop-up window. Also, the left Navigator panel will expand to reveal all of the objects that were just created (e.g., Network_1, organized under two different groups. First comes the specifications (specs) and below that the layers group, which includes not only the actual layer objects for the network but also all of the actual units, projections, and connections that were built between the units in the layers. Feel free to click around on these objects now to see what they have in them -- we will just use the defaults so there is no need to change anything.

Again, make sure that your network is actually called Network_1 because all of the subsequent links will refer to it by that name. Rename it if you have to.

We'll next be moving on to making the InputData for the simple target detection task, but first below are a few optional topics that you can explore if you wish (or come back to later at any time).

→ skip optional topics and continue to InputData

Manipulating the Visualizer View

The controls for the Visualizer panel (3D view) are located on the extreme right-hand side of the view panel starting with the red arrow at the top. Drag the mouse over them to see what they do (a "tool tip" should pop up when the mouse hovers over the button).

To begin, you can experiment with the hand tool -- if you click the mouse and move it around, you'll see that you can manipulate the position of the "camera view" for the 3D view of the network.

Two key tips:

  • Holding down the SHIFT key (while moving the mouse) will pan the view instead of rotating the view
  • Pressing the eye icon restores the initial view. You can also save alternate views by assigning new views to the Vw buttons at the bottom of the view panel, which you also rename with descriptive labels, e.g., FullNet, HidOnly, etc.

At some point you'll discover that if you don't completely stop before lifting the mouse button, the view continues to rotate -- kind of mezmerizing -- apologies if you spend too much time doing this (we certainly have.. :) In any event, you can stop the spinning by simply clicking in Visualizer panel.

If you have a scroll wheel on your mouse, or similar functionality on a touchpad, you'll see that it acts like a zoom. The same effect can be had by manually scrolling the Zoom wheel.

The V.Rot and H.Rot wheels rotate precisely around the x and y axes -- these are often more useful than the mouse-based rotation using the "hand" tool because they don't introduce off-angles. Arrow keys can also be used here -- just click on the background of the view and use the arrow keys (shift moves, without shift rotates).

The Flashlight button is very useful for zooming in on something of interest (especially for large complicated displays) -- after clicking on its icon, click on an object in the view (NOTE: text doesn't work as a target for this purpose). This button stays on until unclicked or another button is clicked, so you can do repeated exploration.

Finally, for extra thrills, you can click the right mouse button (or equivalent on a laptop, Mac, etc.) and configure many interesting display options -- check out the different draw styles, and the stereo mode options -- dig out those old red/green stereo glasses!

Configuring the Network View

Once the network has been created, the right-most tab in the middle Editor panel, labeled Network_1 provides various parameters for controlling the network display.

There are 3 main segments in the Editor panel for the network view (see the wiki Network View page for more info):

  • Primary display parameters at the top (font sizes, display style etc) (mouse over to get more info, and explore!)
  • Unit Display Values Selector (left tab) -- which network variable value to display in the units in the network view (activations vs. weights vs. netinputs etc). If you select one of the weight variables (e.g., r.wt for receiving weights into a selected unit; s.wt is for sending weights out), you then need to use the red arrow tool in the viewer to select a unit to view -- it will turn green/dark gray, and you should be able to see its weights. For convenience, short-cut buttons can be set to select the most common network variables by toggling the check boxes to the left of each parameter listed. Some of the most useful ones are pre-set by default.
  • Spec Explorer (right tab) -- this is very handy for seeing where your specs are used in the network -- try clicking on the HiddenLayer and then Input_Output -- note that the layer border changes color indicating which layers are using these layer specs. You can also use the context menu (e.g., right-click) to edit the network specs right there.

Changing the Network Layout

You can also configure the network layout interactively in the viewer, including repositioning the layers, and orienting the network display relative to other objects in the view (which we postpone for later, when this arises).

To do this, select the red arrow tool, and you'll see that transparent purple arrow objects now appear on each layer, and a box appears on the network text box. These are the manipulation controls. Try clicking on one of the horizontal arrows for the Output layer, and moving it around. This moves within the "horizontal" plane (the X-Y plane for the network). The vertical arrows not surprisingly move in the vertical dimension (the Z axis for the network). Using these manipulation controls can take some getting used to, but you'll find they can become very useful with practice.

→ next InputData or InputData in emergent