From d2881b47d4996654a650c814b44eb9a97fd67f1b Mon Sep 17 00:00:00 2001 From: Marcel Rieger Date: Fri, 16 Feb 2024 09:13:19 +0100 Subject: [PATCH] Add usage hints for saving tf graphs. --- content/inference/tensorflow2.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/inference/tensorflow2.md b/content/inference/tensorflow2.md index b36fca7..1d4196a 100644 --- a/content/inference/tensorflow2.md +++ b/content/inference/tensorflow2.md @@ -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"`. @@ -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"`.