Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to save trained models to load them in ofxTensorFlow2? #41

Open
alexdrymonitis opened this issue Sep 27, 2024 · 1 comment
Open

Comments

@alexdrymonitis
Copy link

alexdrymonitis commented Sep 27, 2024

I've saved a model with the SavedModel format by calling:

tf.saved_model.save(model, "./1/")

following the instructions here. I have renamed the model to graph_frz.pb, but when I try to load it in example_frozen_graph_char_rnn, I get the following error and the program chrashes:

terminate called after throwing an instance of 'std::runtime_error'
  what():  Invalid GraphDef
[verbose] ofSignalHandler: Aborted

The README file of this example reads: By default ofxTF2::Model will use the SavedModel format.
If this is indeed the case, why is the program charshing and how can I save a trained model to load it?

@danomatika
Copy link
Member

@bytosaur Any thoughts? I wouldn't know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants