cpetig / tflite_micro_compiler

generate tflite micro code which bypasses the interpreter (directly calls into kernels)
Apache License 2.0
76 stars 26 forks source link

Added functions to retrieve output dimensions #36

Closed alxhoff closed 4 years ago

alxhoff commented 4 years ago

I don't know enough about TF tensor dimensioning yet but functions like these would help me with my hardware implementations :)

Mainly not sure if the tensor dimensions are always returned in an array (int *) or if this can vary in depth.

rafzi commented 4 years ago

You could get this information from the prefix_output API.

I think we should avoid adding functions that are not really required in the .cpp. They can only be removed when going for link-time optimization.

We could move forward with the header generation and add some nicer APIs as inline stubs there.

alxhoff commented 4 years ago

Sounds like a good idea. I wasn't sure how everyone would want to handle this. I just want a easy API that doesn't have me going deep into data structures every time.

cpetig commented 4 years ago

I agree with Rafael here, this function can easily be implemented in a separated header - and the way implemented here it would always create code (unless each function is placed in a separate section and unused sections are removed by the linker - as with some embedded tool chains)