Network Convertor - DigitalMediaProfessionals/dv-sdk GitHub Wiki
The network convertor (referred to as the convertor) converts network models and weights from Deep Learning frameworks into the format that our AI FPGA module (reffered to as MODULE) can run.
Setup
See Environment setup to setup Python environment. It is recommend to run the convertor on PC instead of MODULE, since the CPU speed and memory size is very limited on MODULE.
Run the script
The convertor is written in Python. To run the convertor, simply type the following commands in console. (See Input Config for the details of the input config file.)
$ cd convertor
$ python convertor.py <path to the input config .ini file>
The convertor generates source files of the network, packed weight file and doxygen-related files. see Converted network configuration for more details.
The above image shows the basic stages of the convertor. The basic stages of the convertor is shown in the above image. The convertor converts the input network into internal format, and then will do an analysis on the network. It will try to merge nodes to the same layer as consequent runs. Current implementation do the analysis based on heuristic rules, so the results may not be perfect yet.
Supported Deep Learning framework
Currently the convertor supports networks of Caffe or Keras frameworks. See this page for supported layer types. NOTE that the convertor cannot convert a network whose input size is not defined.