I've downloaded the nnlib into my Linux workstation and following the README.HOW_TO_BUILD to build it.
When I try the 3rd step make tree VERBOSE=1 V=android_Release I got the error:
Hexagon_SDK/3.3.3/incs/stddef -I/home/jshen/Qualcomm/Hexagon_SDK/3.3.3/libs/common/rpcmem/android_Release/ship -Iandroid_Release -oandroid_Release/graphmain.o test/graphmain.ctest/graphmain.c:436:22: fatal error: pmu_adsp.h: No such file or directory#include "pmu_adsp.h"^compilation terminated./home/jshen/Qualcomm/Hexagon_SDK/3.3.3/build/make.d/rules.min:602: recipe for target 'android_Release/graphmain.o' failedmake[1]: *** [android_Release/graphmain.o] Error 1make[1]: Leaving directory '/home/jshen/dev/nnlib'glue/android.mak:7: recipe for target 'tree' failedmake: *** [tree] Error 2
Is there any fix on this?
I also tried integrated nnlib in my one project in SDK3.3.3. Is it correct to include hexagon_nn.h and use api listed in intro.txt ?
By looking at the update log of graphmain.c in the example, we believe that the missing head file is just the replacement of the deleted text which defines the array of cstring const char *event_names[] with conditions.
Thus we generate a pmu_adsp.h file from the above understanding and save it in the test derectory.
It compiles now!
By looking at the update log of graphmain.c in the example, we believe that the missing head file is just the replacement of the deleted text which defines the array of cstring const char *event_names[] with conditions.
Thus we generate a pmu_adsp.h file from the above understanding and save it in the test derectory.
It compiles now!
By doing the following 3 things not included in the HOW_TO_BUILD guide, I finally executed the example graph_app:
1. Generated the missing headfile.
2. Run the scripts to generate keyboard_299.dat file from the jpg file.
3. Use --elementsize 1 instead of --elementsize 4 in the guilde.
* Or, elementsize 4 can be reseved, but the python script need to be updated: comment line 52 and uncomment line 53:
Hi Jialis
1) Use command
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
2) Hexagon DSP SDK 3.3.3
3) nnlib source code
4) python --version
Python 2.7.6
Assuming that you have machine with above configuration or above. In case if you have all in place then move to "nnlib/test" folder use the following command
Step1: python imagedump.py keyboard_299x299.jpg r2.dat
Image size: 299x299
// this will be shown in command line after you issue the above command
Step 2: Copy r2.dat file in to folder /data/r2.dat
Where /data folder in device ( you can use adb shell command to do this work
After you copy r2.dat then use following .
Step 3: Copy graph_app file in to /data/graph_app
Assuming that above 3 steps went well, then try the following.
Step 4:
adb shell /data/graph_app --height 299 --width 299 --depth 3 --elementsize 4 --perfdump 1 /data/r2.dat
Hint: file size of r2.dat is 268203
299*299*3 = 268203
Thus, -depth 3 appears to be correct choice
Above should help you.
In case not send error msg
////////////////////////////////////////
jk/BLR
Hi JK
Thanks for your advice, but I didn't find any different between yours and my procedures, except the filename of .dat file.
In my previouse post (step 3), I tried two different datatypes:
convert the jpg into uint8 raw data, and in the command line set --elementsize 1
or
conver tht ejpg into float raw data, and in the command line set --elementsize 4.
Neither of them worked.
Hi JK
Thanks for your advice, but I didn't find any different between yours and my procedures, except the filename of .dat file.
In my previouse post (step 3), I tried two different datatypes:
convert the jpg into uint8 raw data, and in the command line set --elementsize 1
or
conver tht ejpg into float raw data, and in the command line set --elementsize 4.
Neither of them worked.
Hi
Jialis did you try
python imagedump.py keyboard_299x299.jpg r2.dat
what is size of r2.dat
Hint:
file size of r2.dat is 268203
299*299*3 = 268203
Thus, -depth 3 appears to be correct choice
if you are getting 268203 as size of r2.dat then things will go well
Regards
jk
Yes.
As described in my setp2, I did exactly the same and get a dat file which size is 268203
I also update the python script (see step 3.), to generate a float data file, which size is 1072812 = 299*299*3*4(sizeof float)
But neither works.
Yes.
As described in my setp2, I did exactly the same and get a dat file which size is 268203
I also update the python script (see step 3.), to generate a float data file, which size is 1072812 = 299*299*3*4(sizeof float)
But neither works.
@v-jayakumar the issue with the testapp in nnlib, except those conversion process needed as you mentoined, is that it is not a complete developed neural net, thus the results are random, the code in the `test/graphinit_small.c`:
'73 #define APPEND_CONST_NODE(ID,...) if (hexagon_nn_append_const_node(nn_id,ID,__VA_ARGS__) != 0) \