This fixes a few issues with the current gcc translation
Move network definition variables from header to c file
We define the network definition variables (with external linkage) in our header. When we include that header into multiple translation units, i.e., nn_model & our additional "main" file, we define the variables multiple times (with external linkage).
-> compile error.
In the arduino example it works as we "extern include" the nn_model.h. However, that's not easily understandable and not the way most people would include a header.
Include guard on header
The header file was missing an include guard -> we declare the functions multiple times once the header is included in any additional file besides nn_model.c
HORIZONTAL_STRIDE
HORIZONTAL_STRIDE was not set to 0 in case there isn't any stride defined.
This fixes a few issues with the current gcc translation
Move network definition variables from header to c file
We define the network definition variables (with external linkage) in our header. When we include that header into multiple translation units, i.e., nn_model & our additional "main" file, we define the variables multiple times (with external linkage). -> compile error. In the arduino example it works as we "extern include" the
nn_model.h
. However, that's not easily understandable and not the way most people would include a header.Include guard on header
The header file was missing an include guard -> we declare the functions multiple times once the header is included in any additional file besides
nn_model.c
HORIZONTAL_STRIDE
HORIZONTAL_STRIDE
was not set to 0 in case there isn't any stride defined.