I am using paper: Keras2c: A library for converting Keras neural
networks to real-time compatible C to convert a model made in Keras to C. Because I need to compile it on hardware with little computational power. How API transforms? basically it loads the weights from the extension model (.h) and transforms it into three different files:
<function_name>.c that when called replicates the forward pass (inference) through the neural network
<function_name>.h is the header file associated with the generated source file, containing function declarations.
<function_name>_test_suite.c contains a main program to run sample inputs through the generated code to ensure that it produces the same outputs as the original python model.
Thus, the keras2c documentation shows its use. However, when I execute the following function:
from keras2c import k2c
k2c("classification_model.h5", "modelC", malloc=False, num_tests=10, verbose=True)
It displays the following error:
Traceback (most recent call last):
File "c:UsersdossaDesktopkeras2c-masterconvert.py", line 2, in <module>
k2c("classification_model.h5", "modelC", malloc=False, num_tests=10, verbose=True)
File "c:UsersdossaDesktopkeras2c-masterkeras2ckeras2c_main.py", line 216, in k2c
check_model(model, function_name)
File "c:UsersdossaDesktopkeras2c-masterkeras2ccheck_model.py", line 232, in check_model
raise AssertionError(log)
AssertionError: The following errors were found:
Functional' is not supported at this time.
Has anyone used the API, could you help me solve this problem?