|
Snapdragon Neural Processing Engine SDK
Reference Guide
|
SNPE supports DLC files created from previous SNPE release (any release after 1.0). However, users experiencing issues when upgrading to a new SNPE release may want to try reconverting their model to DLC with the current release.
SNPE Release 1.16.0 introduces support for the batch dimension which requires some special attention.
In older releases, if the source model contained a batch dimension, resulting in a 4D input tensor, the dimension was quietly ignored and the converted DLC would use a 3D input tensor in its place. From Release 1.16.0 onward, the batch dimension is honored and stored in the DLC.
For example, if a Caffe source model contains an input with dimensions {1,3,224,224}, older releases of SNPE would have converted this to an input with dimension {224,224,3}. In the newer releases, the converter creates an input with dimension {1,224,224,3}. The addition of the batch dimension will ripple all the way through to the end of the model, and the output tensor will also have a batch of 1 added to its dimensionality.
This means that existing application code that assumes a 3D input tensor has to be updated to now assume a 4D tensor, when it is executed against a DLC file that was converted using the new release.
Additionally, if the source model contained the batch dimension with a non-unity extent, this extent is reflected in the DLC. For example, if our Caffe source model had an input with dimension {5,3,224,224}, older SNPE releases would have produced an input of {224,224,3}. But new releases create an input of dimension {5,224,224,3}. The application code using this model is now expected to give SNPE an input tensor with a size of 5x224x224x3 = 752,640 values.