Project window. Using the EDIT tab

Friday, November 03, 2017

App

Posted by Yoshiyuki Kobayashi

The edit tab is used to edit the network structure of a neural network used for training.

Neural Network Console expresses neural network structures using a combination of predefined components (functions) called layers.

 

1 Adding a new layer to the network graph

Drag the layer you want to add to the network graph from the component list on the left side of the edit tab.
Or, double-click the layer on the component list.
Or, click the layer on the component list or select it using the up and down arrow keys, and then press Enter on the keyboard.
Or, click the layer on the component list or select it using the up and down arrow keys, and then double-click the network graph.

 

Reference

If you add a layer by double-clicking on the component list or by pressing Enter when a layer is selected on the network graph, the new layer is automatically linked to the selected layer.

 

2 Selecting a single layer

Click a layer on the network graph.
Or, click the network graph, and then move to the target layer using the arrow keys.

 

3 Selecting several layers

While holding down the Ctrl key, click layers on the network graph.
Or, select the first layer, and then use the arrow keys while holding down the Ctrl key.
Or, click an empty area on the network graph, and drag to select a range of layers.

 

4 Selecting all layers

Right-click the network graph to open a shortcut menu, and click Select All.
Or, press Ctrl+A on the keyboard.

 

5 Inverting the layer selection

Right-click the network graph to open a shortcut menu, and click Inverse Layer Selection.

 

6 Clearing the layer selection

Click an area that is not a layer or link on the network graph.
Or, right-click the network graph to open a shortcut menu, and click Clear Selection.
Or, press Esc on the keyboard.

 

7 Moving the layer coordinates

  1. Select the layer you want to move.
  2. Drag the layer to move it.

 

8 Deleting a layer

  1. Select the layer you want to delete.
  2. Right-click the network graph to open a shortcut menu, and click Delete.
    Or, press Delete on the keyboard.

 

Notes

When you delete a layer, the link connected to the layer is also deleted.

 

9 Inserting a new layer at an existing layer position

  1. Click the layer on the component list or select it using the up and down arrow keys.
  2. On the network graph, select the layer where you want to insert the selected layer into.
  3. Press Insert on the keyboard.

 

10 Deleting a layer while retaining the link structure

  1. Select the layer you want to delete.
  2. Press the Backspace key on the keyboard.

 

11 Connecting (linking) two layers

On the network graph, drag the link destination layer just below the link source layer.
Or, drag the output pin of the link source layer to the input pin of the link destination layer.
Or, select the link source layer, and then while holding down the Shift key, click the link destination layer.

 

12 Changing the link destination

On the network graph, drag the link you want to change.

 

Reference

You can change the link source layer by dragging the end of the link on the output pin side and the link destination layer by dragging the end of the link on the input pin side.

 

13 Selecting a link

Click a link on the network graph.

 

14 Deleting a link

  1. Select the link you want to delete.
  2. Right-click the network graph to open a shortcut menu, and click Delete.
    Or, press Delete on the keyboard.

 

15 Undoing past edits

Click the Undo button at the top of the window.
Or, right-click the network graph to open a shortcut menu, and click Undo.
Or, press Ctrl+Z on the keyboard.

 

Reference

Neural Network Console allows you to undo up to the last 100 edits.

 

16 Redoing edits that have been undone

Click the Redo button at the top of the window.
Or, right-click the network graph to open a shortcut menu, and click Redo.
Or, press Ctrl+Y on the keyboard.
Or, press Ctrl+Shift+Z on the keyboard.

 

Notes

If you perform any edits other than undo, you will not be able to redo past edits.

 

17 Cutting a layer into the clipboard

  1. Select the layer you want to cut.
  2. Click the Cut button at the top of the window.
    Or, right-click the network graph to open a shortcut menu, and click Cut.
    Or, press Ctrl+X on the keyboard.

 

18 Copying a layer into the clipboard

  1. Select the layer you want to copy.
  2. Click the Copy button at the top of the window.
    Or, right-click the network graph to open a shortcut menu, and click Copy.
    Or, press Ctrl+C on the keyboard.

 

19 Pasting a layer from the clipboard

Click the Paste button at the top of the window.
Or, right-click the network graph to open a shortcut menu, and click Paste.
Or, press Ctrl+V on the keyboard.

 

20 Automatically arranging layers

Right-click the network graph to open a shortcut menu, and click Arrange Layers.

 

21 Moving the display range of the network graph

Drag the scroll bar shown at the right and at the bottom of the network graph.
Or, use the mouse wheel. Rotate only the mouse wheel to scroll vertically. Rotate the mouse wheel while holding down Shift to scroll horizontally.

 

22 Zooming the network graph display

  1. Click the network graph.
  2. While holding down Ctrl, rotate the mouse wheel.
    Or, while holding down Ctrl, press the plus (+) or minus (-) key.
    Or, right-click the network graph to open a shortcut menu, and click Zoom and then Zoom In or Zoom Out.

 

23 Resetting the zoom ratio of the network graph display to default

  1. Click the network graph.
  2. While holding down Ctrl, press the 0 (zero) key.
    Or, right-click the network graph to open a shortcut menu, and click Zoom and then Default.

 

24 Editing layer properties

  1. Select one or more layers that you want to edit the properties of.
  2. Of the properties shown in the Property list, click the value of the property you want to edit.
    Or, click the Property list, move to the target property using the arrow keys, and press Enter.
  3. For properties that require you to enter a string, type the value from the keyboard. For properties that you select from the available options, select the value using the mouse or the up and down arrow keys.
  4. Editing ends when you move to a different editing task, press Enter, or press ESC.

 
For property values, you can specify the following values in addition to normal values and character strings.

Property value Description Examples
* (asterisk)+another property name The value of another property in the same layer is copied and used. Set the OutShape property of the Affine layer to “*Input” in order to set the output size to the same size as the input.
* (asterisk)+argument layer name The Value property value in the argument layer with the specified name in the current network is copied and used. Prepare an argument layer named ConvKernel, and set Kernel Shape of multiple convolution layers to “*ConvKernel”. This allows KernelShape of the multiple convolution layers to be specified by editing the Value property of the argument layer.
Expression, comma-separated expression Arithmetic operations and arithmetic operations constructed with parentheses can be used.

Other properties of the same layer and argument layers can be used as variables in expressions.

When the variable is an array, the bracket operator can be used to specify the index of an array element.

Set OutMaps of a convolution layer to “Input[0]*2” in order to make OutMaps twice the number of input maps.

Set Padding of a convolution layer to “KernelShape[0]/2,KernelShape[1]/2” in order to make Padding half KernelShape.

 

Notes

Edits are applied immediately when you enter a value (they are applied before you press Enter). If you want to restore the value to its original value, use the undo function.

 

Notes

Editable properties appear dark black. Other property values are automatically calculated based on the layer link status or other property values.

 

Notes

A warning mark appears on the right side of the Property list for properties set to invalid values or those that are in conflict as a result of linking to other layers. In addition, on the Network graph, a warning mark appears in the upper right of a layer containing properties in conflict. In such circumstances, review the layer links, or correct the property values.

 

25 Editing the properties of multiple layers collectively

Edit the properties while multiple layers are selected.
When you enter a value in a property, the values of the properties with the same name on all selected layers will be changed.

 

26 Creating layer units

  1. Select one or more layers you want to create a unit of.
  2. Click Create Unit. A Create Unit dialog box appears.
  3. Enter the name of the unit network, and click Create.

 

27 Viewing the amount of memory and calculation each layer needs

  1. Select the layer you want to view the needed amount of memory and calculation for.
  2. View the following values in the Property list.
Item Description
CostParameter Total number of parameters that the layer has
CostAdd Number of additions that the layer needs for calculation
CostMultiply Number of multiplications that the layer needs for calculation
CostMultiplyAdd Number of multiplications and additions that the layer needs for calculation
CostDivision Number of divisions that the layer needs for calculation
CostExp Number of exponentiations that the layer needs for calculation
CostIf Number of conditional branching decisions that the layer needs for calculation

 

Reference

Items that never need any amount of memory or calculation do not appear in the Property list.

 

28 Viewing the description of layers on the Web

  1. Select the layer you want to view the description of.
  2. Click the description icon (an icon of a book) in the upper right of the property list.
    Or, press Ctrl+F1 on the keyboard.

The browser starts, and a page containing the description of the selected layer opens.

 

29 Viewing the statistics of the entire network

View the network statistics at the right on the edit tab.

 

Network statistics show the following statistics.

Item Description
Output Number of intermediate calculated values (buffers) that need to be retained in the calculation process
CostParameter Total number of parameters that the whole neural network has
CostAdd Number of additions needed in a single neural network calculation
CostMultiply Number of multiplications needed in a single neural network calculation
CostMultiplyAdd Number of multiplications and additions needed in a single neural network calculation
CostDivision Number of divisions needed in a single neural network calculation
CostExp Number of exponentiations needed in a single neural network calculation
CostIf Number of conditional branching decisions needed in a single neural network calculation

 

30 Copying the statistics of the entire network to the clipboard

Right-click the network statistics to open a shortcut menu, and click Copy.

 

31 Viewing specific statistics in detail

Under Network Statistics, click the statistic that you want to view in detail.
Or, click Network Statistics, and then select the type of network statistics using the up and down arrow keys.
Or, select the statistics property from the Property list.

The percentage that the selected statistic occupies in each layer is shown to the right of the layer on the Network graph.

Reference

If no statistic is selected, the Output information is shown to the right of each layer by default.

 

32 Saving the network being edited in a file as an image

  1. Right-click the network graph to open a shortcut menu, and click Save Network Bitmap.
  2. Specify the save destination image file name.

 

33 Loading an nntxt, nnp, or ONNX file

  1. Right-click the network graph to open a shortcut menu, and click Import->nntxt, nnp, ONNX.
  2. Specify the nntxt, nnp, or ONNX file to load.

 

Reference
An nntxt file contains descriptions of the neural network structure that Neural Network Console creates during training and the training settings. When an nntxt file is imported, the settings on the EDIT tab and CONFIG tab are loaded from the file.

An nnp file contains descriptions of the neural network structure, training settings, trained parameters, and the like that the Neural Network Libraries handle. When an nnp file is imported, the settings on the EDIT tab and CONFIG tab are loaded from the file. If the nnp file contains trained parameters, trained parameter files are loaded into Weight (W.File) and Bias (b.File) of Convolution, Affine, and the like.

Open Neural Network Exchange Format (ONNX) is an open file format that allows Deep Learning models to be shared between different software applications.
https://onnx.ai/
When an ONNX file is imported, the network structure is loaded into the EDIT tab with the trained parameters from the file assigned to Weight (W.File) and Bias (b.File) of Convolution, Affine, and the like.

 

34 Loading a network from Caffe prototxt (beta)

  1. Right-click the network graph to open a shortcut menu, and click Import->prototxt (Caffe) beta.
  2. Specify the prototxt file to load.

 

Notes

Of the information written in prototxt, Neural Network Console loads only the information that is compatible with Neural Network Console and discards the other information. Layers not supported by Neural Network Console are loaded as unsupported layers. Unsupported layers are dummy layers that are made available just for viewing their information and must be deleted before training is executed.

 

35 Exporting a network in Caffe prototxt format (beta)

  1. Right-click the network graph to open a shortcut menu, and click Export->prototxt (Caffe) beta.
  2. Specify the prototxt file to export to.

 

Notes

Of the available network information, Neural Network Console exports only the information that is compatible with prototxt and discards the other information. To perform training on Caffe using the exported prototxt, additional information needed in training on Caffe must be included.

 

36 Exporting Python codes of network definitions that can be used with Neural Network Libraries

Right-click the network graph to open a shortcut menu, and click Export->Python Code(NNabla).

The Python code of network definitions is copied to the Clipboard.

 

37 Exporting a network to a pptx file

Right-click the network graph to open a shortcut menu, and click Export->pptx beta.

The exported pptx file is opened with the associated application.

 

38 Exporting a training result report to a html file

Right-click the network graph to open a shortcut menu, and click Export->html beta.

The exported html file is opened with the associated application.

 

39 Adding additional network structures to a project

Click the “+” button at the top of the network graph.

 

40 Changing the network structure you want to edit

Click the appropriate tab at the top of the network graph.

Or, double-click a unit layer, and change the network structure to be edited to the network structure used in the unit layer.

 

Notes

In all network structures in a project, layers with the same name must have the same properties, with some exceptions. During training and evaluation, layers and parameters with the same name are shared between all network structures.

 

41 Changing a network structure name

  1. Click the appropriate tab at the top of the network graph.
  2. Click the tab name, and then click it again.
  3. Type the network structure name, and press Enter.

 

Notes

The name of the main network structure is “Main.” If you specify “Main” for a network structure name, an validation network structure “MainValidation” and runtime network structure “MainRuntime” are automatically generated based on the training neural network that you designed. If you specify a name other than “Main,” you will need to set the training, validation, and runtime network structures separately.

 

42 Deleting a network structure from a project

  1. Click the appropriate tab at the top of the network graph to select the network structure you want to delete.
  2. Click the “x” button at the right edge of the network structure.

 

43 Rearranging the network structures

Drag horizontally the tab at the top of the network graph.