[model] Add support of ini based backbone to the model
authorParichay Kapoor <pk.kapoor@samsung.com>
Thu, 22 Oct 2020 08:28:26 +0000 (17:28 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Fri, 30 Oct 2020 01:30:27 +0000 (10:30 +0900)
commit4b0073b82dda23922983df8a3e6f3a3467984928
tree3ead0075d4dc1971210715c54159acb0e41e29a7
parent036cab2c8a9b899dbfd719a063d079bee9aeeb4e
[model] Add support of ini based backbone to the model

This patch adds support of ini based backbone to the model neural network
From the point of view of ini file, backbone is treated as a layer itself.
This allows a graph of layers to be represented as a layer itself in the
ini file.

With this design, backbone must be specified as a layer with property backbone
as shown below with a sample pseudo-ini:
```ini
[Block1]
backbone: base_block.ini

[PoolLayer]
type: pooling2d

[Block2]
backbone: base_block.ini
```

ModelLoader loads the layer configuration from the backbone independently
and then extends the existing graph in the main model with this newly created
graph from the backbone ini.

The names of all layers which are inserted from the backbone to a model are
prefixed with the name of the backbone for easier management and for the user
to identify/manage the layers from a backbone.

The patch allows nested backbones and multiple backbones in a model description.
Unittests for this backbone support will follow in the next patch.

See also #660

**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped

Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
nntrainer/include/model_loader.h
nntrainer/include/neuralnet.h
nntrainer/src/model_loader.cpp
nntrainer/src/neuralnet.cpp