gosha20777 / keras2cpp

it's a small library for running trained Keras 2 models from a native C++ code.
MIT License
183 stars 54 forks source link

Inference on c++ model fails: file cannot be read #22

Open Jugaris89 opened 4 years ago

Jugaris89 commented 4 years ago

Hi, thanks for this work!

I am using the keras2cpp implementation to convert a trained model with keras_retinanet to c++. I have managed to do everything successfully, the ".model" file is generated, the c++ reads an image and passes it to the model and it compiles and links but when executing the compiled keras2cpp binary I get the following error: imagen

I have been doing some debugging and what fails is the read of the model. It is not a matter of permissions.

The only thing I do different when exporting the model after training and validation is that I use "model.fit_generator" instead of "model.fit" as in the example provided by you, but it should not be an issue right? do you have an idea about why this could be happening? my guess is, the model is being generated wrong somehow.

thanks in advance!