Forums - MobilenetSSD - Failed to create tensor

2 posts / 0 new
Last post
MobilenetSSD - Failed to create tensor
nshamshiva
Join Date: 4 Sep 18
Posts: 1
Posted: Wed, 2018-10-03 08:25

Hi,

 I have slight modified version of  mobilenet SSD caffe which i have trained. While doing inferencing on SNPE 1.18.0 (using android app) we see a crash and it say "cannot create a tensor" .   Tested Inference on x86 cpu and it works (not on SNPE). 

here is the log snippet:

01-02 02:02:36.224 26918 26918 W snpe-android: Failed to create tensor object from with shape: (1,1,0,7,)

01-02 02:02:36.224 26918 26918 D AndroidRuntime: Shutting down VM
--------- beginning of crash
01-02 02:02:36.224 26918 26918 E AndroidRuntime: FATAL EXCEPTION: main
01-02 02:02:36.224 26918 26918 E AndroidRuntime: Process: xxx.apps.xxx.com.androidxx, PID: 26918
01-02 02:02:36.224 26918 26918 E AndroidRuntime: java.lang.IllegalStateException: Unable to create native tensor!
01-02 02:02:36.224 26918 26918 E AndroidRuntime:  at com.qualcomm.qti.snpe.internal.NativeFloatTensor.nativeInit(Native Method)
 
Please can you share your thoughts on what exactly i'm doing wrong here.
 
thanks
  • Up0
  • Down0
gesqdn-forum
Join Date: 4 Nov 18
Posts: 184
Posted: Tue, 2019-12-10 04:15

Hi,

This error usually comes when the size of the input bitmap image in the Android application is not matching with the model's input shape. Try to resize the input bitmap image according to the shape defined in the model.

If the error still persists please share the code to analyze and debug further.

Thank you.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.