Forums - Multiple Input and Multiple Output Model inference

7 posts / 0 new
Last post
Multiple Input and Multiple Output Model inference
vyom.mishra
Join Date: 24 Feb 20
Posts: 13
Posted: Tue, 2021-06-01 02:33

Dear Sir,

SNPE Version: 1.48.0.2554

Ubuntu : 18.04

We have a model which has multiple inputs and multiple outputs.

We have tested the model with snpe-net run successfully but looking for the same functionaity in SNPE Native CPP application.

As of now we have implemented the multiple input functionality but not able to extract multiple layer output from the model.

Only final layer output is dumped.

Can you please guide us to provide the OutputTensor names directly to snpe->execute so that mutiple output layers dumps happens.

 

Thanks and Regards,

Vyom Mishra

  • Up0
  • Down0
vyom.mishra
Join Date: 24 Feb 20
Posts: 13
Posted: Wed, 2021-06-02 03:37

Dear Sir,

I have enabled option similiar  to "--set_unconsumed_as_output" (option present in snpe-net -run) in SNPE Native Application.

i.e., .setUnconsumedTensorsAsOutputs(setOutput) in setBuilderOptions.cpp and able to get mutiple  outputs layer dumps.

But expected output are 3 but we are getting only 2.

 

Kindly help us to extract all three outputs present in the network and suggest the options to do so.

 

Thanks and Regards,

Vyom Mishra

  • Up0
  • Down0
vyom.mishra
Join Date: 24 Feb 20
Posts: 13
Posted: Thu, 2021-06-03 01:21

Dear Sir,

We are able to provide the multiple input and also able to dump multiple output.

We have modified the setBuilderoption to entertain two additional features for extracting the dump from supplied output layer names

" .setUnconsumedTensorsAsOutputs(setOutput)

   .setOutputLayers(outputLayerNames)
"
 
This setup is running for PC Simulation ,we have verified the PC Simulation results
but its not working on Target device.
 
Below is the error thrown on target :
Error while building SNPE object.
 
Kindly help us to resolve the issue.
 
Thanks and Regards,
Vyom Mishra
  • Up0
  • Down0
diwu
Join Date: 15 Nov 21
Posts: 15
Posted: Mon, 2021-12-27 00:56

Hi, 

    I met the same question as yours, I would like to know if all your inputs are put into input_list.txt? if the input is a (1, 16, 1024, 1024) feature, how to input?

Looking forward to your reply.

Thank you.

  • Up0
  • Down0
weihuan
Join Date: 12 Apr 20
Posts: 270
Posted: Mon, 2021-12-27 02:29

Dear customer,

SNPE will take the input list as the target execution dataset. You can specify the input and output node with below guide inside the input.txt while you run snpe-net-run.

 #Output_1 Output_2
      Input_1:=Placeholder_1/real_input_inputs_1/0-0#e6fb51.rawtensor Input_2:=Placeholder_1/real_input_inputs_1/0-1#8a171b.rawtensor
      Input_1:=Placeholder_1/real_input_inputs_1/1-0#67c965.rawtensor Input_2:=Placeholder_1/real_input_inputs_1/1-1#54f1ff.rawtensor
      Input_1:=Placeholder_1/real_input_inputs_1/2-0#b42dc6.rawtensor Input_2:=Placeholder_1/real_input_inputs_1/2-1#346a0e.rawtensor

 

BR.

Wei

  • Up0
  • Down0
diwu
Join Date: 15 Nov 21
Posts: 15
Posted: Mon, 2021-12-27 23:24

Hi, 

   Which format is the .rawtensor? I would like to know how to convert my own tensor into ".rawtensor". 

   Looking forward to your response.

   thanks, 

  • Up0
  • Down0
weihuan
Join Date: 12 Apr 20
Posts: 270
Posted: Thu, 2021-12-30 17:53

Dear customer,

Above action just an sample for you. You can input with raw instead. The raw file is calculate by yourself. Regarding the input format requirements, you can reivew our SNPE doc for more info.

BR.

Wei

  • 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.