Skip to content

Commit

Permalink
Merge pull request #72 from cms-ml/inference/add_cmsml_hints
Browse files Browse the repository at this point in the history
Add usage hints for saving tf graphs.
  • Loading branch information
valsdav committed May 13, 2024
2 parents e1122f2 + d2881b4 commit 0042545
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions content/inference/tensorflow2.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ Instructions on how to transform and save your model are shown below, depending
# convert to binary (.pb extension) protobuf
# with variables converted to constants
cmsml.tensorflow.save_graph("graph.pb", model, variables_to_constants=True)

# note: save_graph was renamed to save_frozen_graph in newer versions
# of cmsml and you might see a deprecation warning
```

Following the Keras naming conventions for certain layers, the input will be named `"input"` while the output is named `"sequential/output/Softmax"`.
Expand Down Expand Up @@ -172,6 +175,9 @@ Instructions on how to transform and save your model are shown below, depending
# convert to binary (.pb extension) protobuf
# with variables converted to constants
cmsml.tensorflow.save_graph("graph.pb", cmodel, variables_to_constants=True)

# note: save_graph was renamed to save_frozen_graph in newer versions
# of cmsml and you might see a deprecation warning
```

The input will be named `"x"` while the output is named `"y"`.
Expand Down

0 comments on commit 0042545

Please sign in to comment.