| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 170f3a7 commit 21cf2be
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -56,8 +56,8 @@ public string write_graph(Graph graph, string logdir, string name, bool as_text | |||
| 56 | 56 | public Graph load_graph(string freeze_graph_pb) | |
| 57 | 57 | => saver.load_graph(freeze_graph_pb); | |
| 58 | 58 | ||
| 59 | - public string freeze_graph(string checkpoint_dir, string output_pb_name) | ||
| 60 | - => saver.freeze_graph(checkpoint_dir, output_pb_name); | ||
| 59 | + public string freeze_graph(string checkpoint_dir, string output_pb_name, string[] output_node_names) | ||
| 60 | + => saver.freeze_graph(checkpoint_dir, output_pb_name, output_node_names); | ||
| 61 | 61 | ||
| 62 | 62 | public Saver import_meta_graph(string meta_graph_or_file, | |
| 63 | 63 | bool clear_devices = false, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,7 @@ | |||
| 5 | 5 | <AssemblyName>TensorFlow.NET</AssemblyName> | |
| 6 | 6 | <RootNamespace>Tensorflow</RootNamespace> | |
| 7 | 7 | <TargetTensorFlow>1.14.1</TargetTensorFlow> | |
| 8 | - <Version>0.14.1</Version> | ||
| 8 | + <Version>0.14.1.1</Version> | ||
| 9 | 9 | <Authors>Haiping Chen, Meinrad Recheis, Eli Belash</Authors> | |
| 10 | 10 | <Company>SciSharp STACK</Company> | |
| 11 | 11 | <GeneratePackageOnBuild>true</GeneratePackageOnBuild> | |
@@ -18,12 +18,12 @@ | |||
| 18 | 18 | <Description>Google's TensorFlow full binding in .NET Standard. | |
| 19 | 19 | Building, training and infering deep learning models. | |
| 20 | 20 | https://tensorflownet.readthedocs.io</Description> | |
| 21 | - <AssemblyVersion>0.14.1.0</AssemblyVersion> | ||
| 21 | + <AssemblyVersion>0.14.1.1</AssemblyVersion> | ||
| 22 | 22 | <PackageReleaseNotes>Changes since v0.14.0: | |
| 23 | 23 | 1: Add TransformGraphWithStringInputs. | |
| 24 | 24 | 2: tf.trainer.load_graph, tf.trainer.freeze_graph</PackageReleaseNotes> | |
| 25 | 25 | <LangVersion>7.3</LangVersion> | |
| 26 | - <FileVersion>0.14.1.0</FileVersion> | ||
| 26 | + <FileVersion>0.14.1.1</FileVersion> | ||
| 27 | 27 | <PackageLicenseFile>LICENSE</PackageLicenseFile> | |
| 28 | 28 | <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> | |
| 29 | 29 | <SignAssembly>true</SignAssembly> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -85,7 +85,9 @@ public static Saver _create_saver_from_imported_meta_graph(MetaGraphDef meta_gra | |||
| 85 | 85 | } | |
| 86 | 86 | } | |
| 87 | 87 | ||
| 88 | - public static string freeze_graph(string checkpoint_dir, string output_pb_name) | ||
| 88 | + public static string freeze_graph(string checkpoint_dir, | ||
| 89 | + string output_pb_name, | ||
| 90 | + string[] output_node_names) | ||
| 89 | 91 | { | |
| 90 | 92 | var checkpoint = checkpoint_management.latest_checkpoint(checkpoint_dir); | |
| 91 | 93 | if (!File.Exists($"{checkpoint}.meta")) return null; | |
@@ -99,7 +101,7 @@ public static string freeze_graph(string checkpoint_dir, string output_pb_name) | |||
| 99 | 101 | saver.restore(sess, checkpoint); | |
| 100 | 102 | var output_graph_def = tf.graph_util.convert_variables_to_constants(sess, | |
| 101 | 103 | graph.as_graph_def(), | |
| 102 | - new string[] { "output/ArgMax" }); | ||
| 104 | + output_node_names); | ||
| 103 | 105 | Console.WriteLine($"Froze {output_graph_def.Node.Count} nodes."); | |
| 104 | 106 | File.WriteAllBytes(output_pb, output_graph_def.ToByteArray()); | |
| 105 | 107 | return output_pb; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments