Snapdragon Neural Processing Engine SDK
Reference Guide
|
Machine Learning frameworks have specific formats for storing neural network models. SNPE supports these various models by converting them to a framework neutral deep learning container (DLC) format. The DLC file is used by the SNPE runtime for execution of the neural network.
A trained Caffe model consists of:
The snpe-caffe-to-dlc tool converts a Caffe model into an equivalent SNPE DLC file. The following command will convert an AlexNet Caffe model into a SNPE DLC file.
snpe-caffe-to-dlc --input_network $SNPE_ROOT/models/alexnet/caffe/deploy.prototxt --caffe_bin $SNPE_ROOT/models/alexnet/caffe/bvlc_alexnet.caffemodel --output_path alexnet.dlc
The AlexNet model files can be obtained by following the Getting AlexNet tutorial.
A trained Caffe2 model consists of:
The snpe-caffe2-to-dlc tool converts a Caffe2 model into an equivalent SNPE DLC file. The following command will convert an AlexNet Caffe2 model into a SNPE DLC file.
snpe-caffe2-to-dlc --predict_net predict_net.pb --exec_net exec_net.pb --input_dim data 1,3,227,227 --dlc alexnet.dlc
The AlexNet model files can be obtained from the Caffe2 project on Github.