From 9784e0944c35660f2322c0af9ad7ddaa99a181d1 Mon Sep 17 00:00:00 2001 From: Marcel R Date: Thu, 15 Feb 2024 18:46:52 +0100 Subject: [PATCH] Update cmsml tool usage in existing TensorFlow tests. --- PhysicsTools/TensorFlow/test/createconstantgraph.py | 2 +- PhysicsTools/TensorFlow/test/readconstantgraph.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PhysicsTools/TensorFlow/test/createconstantgraph.py b/PhysicsTools/TensorFlow/test/createconstantgraph.py index 9cddb40a5fc94..9063a825c36ee 100644 --- a/PhysicsTools/TensorFlow/test/createconstantgraph.py +++ b/PhysicsTools/TensorFlow/test/createconstantgraph.py @@ -47,4 +47,4 @@ # write it graph_path = os.path.join(datadir, "constantgraph.pb") outputs = ["output"] -cmsml.tensorflow.save_graph(graph_path, sess, output_names=outputs, variables_to_constants=True) +cmsml.tensorflow.save_frozen_graph(graph_path, sess, output_names=outputs, variables_to_constants=True) diff --git a/PhysicsTools/TensorFlow/test/readconstantgraph.py b/PhysicsTools/TensorFlow/test/readconstantgraph.py index 94138e723caa3..f4c9d6b564ad4 100644 --- a/PhysicsTools/TensorFlow/test/readconstantgraph.py +++ b/PhysicsTools/TensorFlow/test/readconstantgraph.py @@ -24,5 +24,5 @@ # read and evaluate the graph graph_path = os.path.join(datadir, "constantgraph.pb") -graph, sess = cmsml.tensorflow.load_graph(graph_path, create_session=True) +graph, sess = cmsml.tensorflow.load_frozen_graph(graph_path, create_session=True) print(sess.run("output:0", feed_dict={"scale:0": 1.0, "input:0": [range(10)]})[0][0])