Commit e46ae334 authored by pbethge's avatar pbethge
Browse files

add usage information

parent 1bf74b21
# Basic example
This is an example for openFrameworks which demonstrates how to load and evaluate a _Frozen Graph_ created using TensorFlow.
This is a very basic example wich demonstrates how to load and infer a _Frozen Graph_ created using TensorFlow.
_Frozen Graph_ is the standard of storing a graph for versions of TensorFlow < 1.15.
We wanted to support this feature for legacy reasons.
### TensorFlow2
We will create a dummy graph for demonstration purposes.
To create the model simply run the following command:
### openFrameworks
By default `ofxTF2::Model` will use the `SavedModel` format. To use the `FrozenGraph` format you may either add the type to the constructor or call `setModelType()` afterwards.
As the default names differ from the names in the `SavedModel` format make sure to overwrite names of the ins and outs by calling `setup()`.
// set model type and i/o names
model.setup({{"x:0"}}, {{"Identity:0"}});
Afterwards you can load the _pb file_ using the `load()` function.
// load the model, bail out on error
if(!model.load("model.pb")) {
Everything else should work the same.
### openFrameworks
\ No newline at end of file
Please understand that we wont be able to invest a lot of time in supporting this feature in the future.
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment