tiny
tiny copied to clipboard
addQuantize and addDequantize in th_final_initialize of anamoly detection submitter_implemented.cpp
Would it be possible to receive an explanation on towards why these functions are being used in the th_final_initialize function. From what I can see, they only run a check and are never used anymore. I ask because I am having some trouble importing the files needed for them to work onto my project. The issue being that adding all the source files needed for those functions makes me go over my memory requirements.
Basically, are these functions/checks essential to the project or would I be able to leave them out?
Those are the functions that add the required operations to the TFLite Micro interpreter. Without them, I don't think the model will be able to successfully execute because it wouldn't be able to resolve calls to any of the layers.
micro_op_resolver.AddFullyConnected()
is a function that adds the fully connect operation to the op resolver. It returns kTfLiteOk
if the function executes successfully.
What are your memory requirements? I may be able to help optimize the memory.
Right now I am trying to report all the source files needed to get those functions running again; so that I can show you what happens. However, it is taking longer than expected so I will give an update as soon as possible
The device has 352kB of flash and 80kB of RAM. Before adding all the source files needed for the AddQuant and AddDequant I am roughly using 95%-97% of the flash already. I already had all the files needed for the AddFullyConnected functions. Last time I tried to add all the files I began to go over the memory requirements.
Also, I am not quite sure if this file is needed. It shows up in a few files but it is not a source or header file. Also, when I go into the file it is just a single line definition.
Looking at the model (below) it seems the int8 model we provide doesn't need the quantize/dequantize operations so you should be able to remove those.
What do you mean by "had all the files needed for the AddFullyConnected functions". You should probably keep micro_op_resolver.AddFullyConnected()
.
Sorry, I just meant that AddFullyConnected() was working with no problem. It was the quantize/dequantize giving me the issues.
So I should be fine just keeping micro_op_resolver.AddFullyConnected() while removine micro_op_resolver.AddQuantize() and micro_op_resolver.AddFullyDeQuantize().
If you are using the int8 model we provide then yet I think that should work.
Let me know how it goes!
Hello,
I tried running the project with the micro_op_resolver.AddFullyConnected() function, but it caused the an overflow of FLASH by 377 bytes. Is there any way of optimizing the memory?
Thank you!
Update: The flash overflow is at 10805 bytes now