|
|
# Network creation
|
|
|
# Network Creation
|
|
|
|
|
|
## Table of Contents
|
|
|
1.[Setup](manual-setup)
|
|
|
1.[ Setup](manual-setup)
|
|
|
|
|
|
2.[Overview](manual-overview)
|
|
|
2.[ Overview](manual-overview)
|
|
|
|
|
|
3.[Network creation](manual-network)
|
|
|
3.[ Caffe Version Management](manual-caffeversions)
|
|
|
|
|
|
4.[ Network Creation](manual-network)
|
|
|
- [Creating a Network](manual-network#creating-a-network)
|
|
|
- [Import an existing network or solver](manual-network#import-an-existing-network-or-solver)
|
|
|
- [Navigation in the node editor](manual-network#navigation-in-the-node-editor)
|
|
|
- [Import an Existing Network or Solver](manual-network#import-an-existing-network-or-solver)
|
|
|
- [Navigation in the Node Editor](manual-network#navigation-in-the-node-editor)
|
|
|
- [Managing Layers](manual-network#managing-layers)
|
|
|
- [Blobs and connections](manual-network#blobs-and-connections)
|
|
|
- [Editing layer and solver parameters](manual-network#editing-layer-and-solver-parameters)
|
|
|
- [Adding parameters](manual-network#adding-parameters)
|
|
|
- [Altering/Removing parameters](manual-network#altering-parameters)
|
|
|
- [Prototxt editor](manual-network#prototxt-editor)
|
|
|
- [Exporting prototxt](manual-network#prototxt-export)
|
|
|
- [Adding Parameters](manual-network#adding-parameters)
|
|
|
- [Altering/Removing Parameters](manual-network#altering-parameters)
|
|
|
- [Prototxt Editor](manual-network#prototxt-editor)
|
|
|
- [Exporting Prototxt](manual-network#prototxt-export)
|
|
|
|
|
|
4.[Network training](manual-training)
|
|
|
5.[ Network Training](manual-training)
|
|
|
|
|
|
5.[Miscellaneous](manual-miscellaneous)
|
|
|
6.[ Miscellaneous](manual-miscellaneous)
|
|
|
|
|
|
## Network creation
|
|
|
### Import an existing network or solver
|
|
|
## Creating a Network
|
|
|
### Import an Existing Network or Solver
|
|
|
Use **File -> Import Network** to import an existing *.prototxt* network file. To import a solver *.prototxt* file, use **File -> Import Solver**. If the solver contains a network definition itself, you get the choice to import it too.
|
|
|
Importing a network automatically arranges the layer nodes.
|
|
|
|
|
|
**Note:** The current network/solver configuration gets replaced by the imported network/solver.
|
|
|
|
|
|
### Navigation in the node editor
|
|
|
### Navigation in the Node Editor
|
|
|
Move the scene - Click and drag the left mouse button on an empty space / Use the scrollbars
|
|
|
|
|
|
Zoom - Mouse wheel
|
... | ... | @@ -43,9 +45,9 @@ Move layers - Click and drag the layer / any selected layer |
|
|
|
|
|
Center view on specific layer - Right click a layer in the **Network Layers**-dock and select **Focus** from the context menu
|
|
|
|
|
|
### Managing layers
|
|
|
### Managing Layers
|
|
|
|
|
|
![DragAndDrop](DragAndDrop.png)
|
|
|
![drag_drop_small](drag_drop_small.png)
|
|
|
|
|
|
To create a new layer node, drag the layer type name from the **Layers**-dock into the graph editor. This creates a new layer of the given type with the default name **[type] #[number]**. The new layer has no [top/bottom blobs](https://ivv5git.uni-muenster.de/klemms/PS-2016-NN/wikis/manual-network#blobs-and-connections). Default parameters get added if available (e.g. *convolution_param* for *Convolution* layers)
|
|
|
By dropping the layer type name on an existing layer node, you can choose to replace the existing layer with the new layer type. This will **remove all parameters** from the layer with the exception of top/bottom blobs and their connections.
|
... | ... | @@ -58,38 +60,36 @@ Selected layers can be deleted by pressing **Del**. All connections, to and from |
|
|
|
|
|
All layers currently in the network are listed in the **Network Layers**-Dock. The list can get sorted by order, name or type in ascending or descending order, by clicking the captions. Order represents the connection hierarchy of the layers, where for every two layers connected with at least one blob the creating layer (the connecting blob is a top blob) is in front of the consuming layer (the connecting blob is a bottom blob). In cases where layers process blobs in parallel, the order is ambiguous.
|
|
|
|
|
|
![NetworkLayers](NetworkLayers.png)
|
|
|
![network_layers_small](network_layers_small.png)
|
|
|
|
|
|
### Blobs and connections
|
|
|
### Blobs and Connections
|
|
|
To add a top or bottom blob to a layer, **right click** the node and select **Add top** or **Add bottom**. When creating a top blob, a dialog will ask for the blobs name.
|
|
|
Alternatively, blobs can be added using the **Layer Properties**-dock by selecting **bottom** or **top** in the right layer, and click on **Add**. If the layer has no top/bottom blob, choose **top [list]** or **bottom [list]** in the selection-menu at the bottom of the Layer Properties-dock and use the **Add**-Button to create the blob. If creating a top blob, type the name in the new input field. The name of bottom blobs can be changed manually too, but if attached connections exist, these will be deleted, since the connected top and bottom blobs always have to be named equally. Otherwise the name of added bottom blobs will get updated automatically when connecting to a top blob.
|
|
|
The name of bottom blobs can be changed too, but if attached connections exist, these will be deleted, since the connected top and bottom blobs always have to be named equally. Otherwise the name of added bottom blobs will get updated automatically when connecting to a top blob.
|
|
|
|
|
|
The rectangles in the lower part of the layer node represent the top and bottom blobs, data flows through the network from left to right. Hence, connectors on the left represent bottom blobs, connectors on the right represent top blobs.
|
|
|
![BlobsAndConnections](BlobsAndConnections.png)
|
|
|
|
|
|
![blobs_connectors](blobs_connectors.png)
|
|
|
|
|
|
To change a top blobs name, select the blob in the **Layer Properties**-dock then click on the name and type a name of your choice. This will also update all bottom blob names, connected to the changed top blob.
|
|
|
|
|
|
You can connect a top and a bottom blob by start dragging on a blobs rectangle and stop at another rectangle. This will create a visible connection between both blobs. Note, that you can't create a connection between two top or two bottom blobs. A top blob can be connected to multiple bottom blobs, but a bottom blob can only be connected to one top blob. (If the layer of the top blob has the **include.phase** parameter, a second top blob can be connected to the bottom blob. The second top blob needs to have the same name as the first and its **include.phase** parameter needs to have another phase. Please note that Barista does not support training stages or levels, yet. If those are needed, please use the [prototxt editor](manual-network#prototxt-editor).)
|
|
|
You can connect a top and a bottom blob by clicking on a blobs rectangle, then dragging and releasing on the rectangle of the blob you want to connect. This will create a visible connection between both blobs. Note, that you can't create a connection between two top or two bottom blobs. A top blob can be connected to multiple bottom blobs, but a bottom blob can only be connected to one top blob. (If the layer of the top blob has the **include.phase** parameter, a second top blob can be connected to the bottom blob. The second top blob needs to have the same name as the first and its **include.phase** parameter needs to have another phase. Please note that Barista does not support training stages or levels, yet. If those are needed, please use the [prototxt editor](manual-network#prototxt-editor).)
|
|
|
|
|
|
Connections can be hidden if they clutter the network view: **Right click** the connection and select **Hide** from the context menu. To show the connection select **Show**. Hidden connections are represented by dashed lines at the start and end of the connection.
|
|
|
|
|
|
If a layer has a top and a bottom blob with the same name, the border of the layer, the blobs rectangle and the connection turn blue, to indicate in-place working layers. Blue top blobs can not be connected to other bottom blobs. Use the last top blob with the name instead.
|
|
|
|
|
|
| **Wrong!** | **Correct!** |
|
|
|
| :------------: | :------------: |
|
|
|
| ![nodeedit-in-place-wrong](nodeedit-in-place-wrong.png) | ![nodeedit-in-place-right](nodeedit-in-place-right.png) |
|
|
|
![correct_in_place_node_small](correct_in_place_node_small.png)
|
|
|
|
|
|
To remove a connection between two blobs, either select the connection and hit **Del** or right click it and select **Remove** in the opening context-menu.
|
|
|
|
|
|
Removing a blob can be done by **right clicking** the blobs rectangle and selecting **Remove** from the context menu. Alternatively a blob can be removed by clicking the **Remove**-button in the **Layer Properties**-dock when the attached Layer is selected. Removing a blob also removes all connections connected to the blob.
|
|
|
Removing a blob can be done by **right clicking** the blobs rectangle and selecting **Remove** from the context menu. Removing a blob also removes all connections connected to the blob.
|
|
|
|
|
|
### Editing layer and solver parameters
|
|
|
### Editing Layer and Solver Parameters
|
|
|
To add, remove and alter the parameters of the different layers and the solver, **Barista** offers the docks **Solver Properties** and **Layer Properties**, which visibility can be set in the menu bar under **View -> Docks -> Layer/Solver Properties**.
|
|
|
|
|
|
The dock **Layer Properties** lists the parameters of a selected layer in the **Graph View**, the dock **Solver Properties** lists the parameters of the Solver. If multiple layers are selected, a tab for each one is shown on the top of the *Layer Properties* dock, from which the user can choose one.
|
|
|
|
|
|
![MultipleLayers](MultipleLayers.png)
|
|
|
|
|
|
![Layer_Properties_Tabs_small](Layer_Properties_Tabs_small.png)
|
|
|
|
|
|
The parameters are listed in a nested way, which directly reflects their definition in the underlying prototxt-file.
|
|
|
They can be separated into two major types:
|
... | ... | @@ -101,32 +101,31 @@ In **Barista**, a **primitive** parameter is shown with its name on the left sid |
|
|
|
|
|
**Group** parameters are marked with a multiple adjuster as an icon. They also have a tiny arrow beside them, pointing either to the right when the content of the group parameter is hidden, or down when the content is shown.
|
|
|
|
|
|
![LayerPropertiesDetail](LayerPropertiesDetail.png)
|
|
|
|
|
|
![Layer_Properties_Details_small](Layer_Properties_Details_small.png)
|
|
|
|
|
|
#### Adding parameters
|
|
|
#### Adding Parameters
|
|
|
To add a new parameter, select the Group Parameter the required (sub)parameter should be part of, then choose the parameter in the selection-menu and click on **Add**.
|
|
|
The selection-menu automatically shows only the suitable parameters when you selected a Group parameter before.
|
|
|
|
|
|
![LayerPropertiesAdd](LayerPropertiesAdd.png)
|
|
|
![layer_parameter_add_small](layer_parameter_add_small.png)
|
|
|
|
|
|
|
|
|
#### Altering/Removing parameters
|
|
|
#### Altering/Removing Parameters
|
|
|
|
|
|
Depending on the type of a primitive parameter, you can choose an option from a combobox, change a string, alter a number, set a path and so on. Simply click on the value you want to change and alter it.
|
|
|
|
|
|
Removing a parameter works the same way. Select a parameter and click on the **Remove**-Button. Some parameters like the name or the type of a layer are not removable, if so the **Remove**-Button is deactivated.
|
|
|
|
|
|
![LayerPropertiesRemove](LayerPropertiesRemove.png)
|
|
|
![layer_parameter_remove_small](layer_parameter_remove_small.png)
|
|
|
|
|
|
|
|
|
#### Prototxt editor
|
|
|
#### Prototxt Editor
|
|
|
|
|
|
To allow the user to directly alter the prototxt-files, **Barista** offers a prototxt editor which can be invoked in the menu bar under **Edit -> Edit Network/Solver as Prototxt**.
|
|
|
|
|
|
Here, the underlying prototxt-files of the network and the solver can be edited directly.
|
|
|
|
|
|
![PrototxtEditor](PrototxtEditor.png)
|
|
|
![prototext_editor_small](prototext_editor_small.png)
|
|
|
|
|
|
Syntax highlighting has been implemented to improve readability.
|
|
|
|
... | ... | @@ -136,7 +135,7 @@ If the prototxt-file has been changed, you can save it by clicking the **Save**- |
|
|
|
|
|
To prevent erroneous alterations which could leave the project in an inconsistent state, trying to save an invalid prototxt-file results in an error-message, which shows the line in which the problem occurred.
|
|
|
|
|
|
![ErrorPrototxt](ErrorPrototxt.png)
|
|
|
![prototext_error_small](prototext_error_small.png)
|
|
|
|
|
|
|
|
|
## Prototxt-Export
|
... | ... | @@ -144,6 +143,5 @@ Barista supports exporting your data in the prototxt format at all times during |
|
|
|
|
|
If you want to export your solver configuration as well, you get some more options by clicking **File -> Export Solver**. As shown in the following screenshot, you can choose how to link the required network with the solver. It can point to an existing file (see the previously-described step) or just include the full net definition inside of the solver's prototxt. The latter is quite handy, if you plan to export both at once.
|
|
|
|
|
|
![baristaExport](baristaExport.png)
|
|
|
|
|
|
| [previous page](manual-overview) | [start page](manual) | [next page](manual-training) | |
|
|
\ No newline at end of file |