mlzxy / vcnn-caffe-convertor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Caffe Convertor

Convert a caffe model to a C struct array. Originally hosted on bitbucket: https://bitbucket.org/xyz0/vcnn-caffe-convertor

Install

[sudo] pip install easydict protobuf
  1. Install Caffe and pycaffe https://github.com/BVLC/caffe

Example Usage

chmod +x ./generate.sh
./generate.sh  

will generate

  1. google lenet for mnist
  2. caffe cifar10 quick train network.

Look into generate.sh for how to use the commandline python tool.

Output

caffe_model_layer.h and caffe_model_layer.cpp will be generated.

  • caffe_model_layer.h contains layer-definition, layer-weight definition.

  • caffe_model_layer.cpp contains layer-weight data, layer structure and image mean (a huge file.)

  • These two files must be put into same folder.

  • In the FPGA, the weight is huge and may not fit into BRAM/DRAM. So I make the definition and weight data seperate.

About


Languages

Language:C++ 98.9%Language:Protocol Buffer 0.7%Language:Python 0.2%Language:C 0.1%Language:Shell 0.0%