summaryrefslogtreecommitdiff
path: root/compiler/nnc/utils/caffe_model_maker/README.md
blob: e34a769a0a4ffabae83d740a5f3baf2217f112f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Utils
Caffe model generation helpers

REQUIRES:

* caffe
* h5py
* lmdb
* numpy
* caffegen in `$PATH`

`GenerateCaffeModels.py` creates `*.prototxt` files for 1 and 2 layer caffe models
The generator can create multiple examples of any layer, assuming you add a
`how_many` field into the layer's dict. You will also need to replace the constants in said dict with `PH(type, param)` values, where `type` is the type of the placeholder variable
and `params` is a list (or tuple) of paramenters for generating the mock.

For an example of generating multiple instances of a layer see the `Log` layer. 

`Filler.sh`  fills a single model with random weights by using `caffegen` and creates a dir with a filled `prototxt` and a `caffemodel` binary file. The result directory is located in the same directory as the `prototxt` file

`AllFill.sh` fills all `*.prototxt` files in the current directory or in provided directory
(-d)