JDAI-CV / DNNLibrary

Daquexian's NNAPI Library. ONNX + Android NNAPI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Need help

KristinHuangGH opened this issue · comments

I am studying your DNNLibrary.
In the Introduction of README.md, you mentioned that
"If you use the "raw" NNAPI, the code will increase dramatically. Setting up a LeNet needs 200+ lines. (For the 200+ lines LeNet you can check out the second commit of this repo)".

I want to study the LeNet using raw NNAPI. You said "you can check out the second commit of this repo", but I am not sure which commit you mean.
Do you mean the code is in Branch: LeNet?
Could you tell me which commit I can study?

Could you please help me?
Thank you very much!

Hi :) It's c4ec039. You could run git reset --hard c4ec03 after you clone it. However the code contains a workaround for a bug in Android O MR1. You need remove the workaround like d2e0a31 so that the code can run.

If you want to know the format of the weight, the weight purely consists of many 32bit floats. You might want to check out https://github.com/daquexian/dnntools, which contains the code produce the whole model file bin.

@KristinHuangGH I'm closing this issue :) Feel free to reopen it if you need.

Hello~
I read the LeNet using raw NNAPI(c4ec039).
How do you know the conv1InputIndexes[] = {0,7,8,16,15,15,17} for ANeuralNetworksModel_addOperation(ANEURALNETWORKS_CONV_2D)?
I mean that how do you know the input for conv1 are 0(input data), 7(conv1Weights), 8(conv1Biases), 16(valid padding), 15(int one), 15(int one) and 17(none activation)??
How do you know what kind of operand should be assigned for the specific Operation?
Where can I get this information?

I have checked OperationCode in the document, but I can't find the information.
For example, how do you know the input of MAX_POOL_2D are 1(conv1),16(valid padding),19(int two),19,19,19,17(none activation)?
Why input 19(int two) four times?
What does 19(int two) mean?