| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 21cf2be commit 1e4e920
2 files changed
| 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.1</Version> | ||
| 8 | + <Version>0.14.2.0</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,13 @@ | |||
| 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.1</AssemblyVersion> | ||
| 21 | + <AssemblyVersion>0.14.2.0</AssemblyVersion> | ||
| 22 | 22 | <PackageReleaseNotes>Changes since v0.14.0: | |
| 23 | 23 | 1: Add TransformGraphWithStringInputs. | |
| 24 | - 2: tf.trainer.load_graph, tf.trainer.freeze_graph</PackageReleaseNotes> | ||
| 24 | + 2: tf.trainer.load_graph, tf.trainer.freeze_graph | ||
| 25 | + 3: Import Protobuf.Text</PackageReleaseNotes> | ||
| 25 | 26 | <LangVersion>7.3</LangVersion> | |
| 26 | - <FileVersion>0.14.1.1</FileVersion> | ||
| 27 | + <FileVersion>0.14.2.0</FileVersion> | ||
| 27 | 28 | <PackageLicenseFile>LICENSE</PackageLicenseFile> | |
| 28 | 29 | <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> | |
| 29 | 30 | <SignAssembly>true</SignAssembly> | |
@@ -60,8 +61,9 @@ https://tensorflownet.readthedocs.io</Description> | |||
| 60 | 61 | </ItemGroup> | |
| 61 | 62 | ||
| 62 | 63 | <ItemGroup> | |
| 63 | - <PackageReference Include="Google.Protobuf" Version="3.11.2" /> | ||
| 64 | + <PackageReference Include="Google.Protobuf" Version="3.11.3" /> | ||
| 64 | 65 | <PackageReference Include="NumSharp" Version="0.30.0-alpha" /> | |
| 66 | + <PackageReference Include="Protobuf.Text" Version="0.4.0" /> | ||
| 65 | 67 | </ItemGroup> | |
| 66 | 68 | ||
| 67 | 69 | <ItemGroup> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,6 +20,7 @@ limitations under the License. | |||
| 20 | 20 | using System.Linq; | |
| 21 | 21 | using static Tensorflow.SaverDef.Types; | |
| 22 | 22 | using static Tensorflow.Binding; | |
| 23 | + using Protobuf.Text; | ||
| 23 | 24 | ||
| 24 | 25 | namespace Tensorflow | |
| 25 | 26 | { | |
@@ -187,24 +188,9 @@ public static CheckpointState get_checkpoint_state(string checkpoint_dir, string | |||
| 187 | 188 | var coord_checkpoint_filename = _GetCheckpointFilename(checkpoint_dir, latest_filename); | |
| 188 | 189 | if (File.Exists(coord_checkpoint_filename)) | |
| 189 | 190 | { | |
| 190 | - var file_content = File.ReadAllLines(coord_checkpoint_filename); | ||
| 191 | + var file_content = File.ReadAllText(coord_checkpoint_filename); | ||
| 191 | 192 | // https://github.com/protocolbuffers/protobuf/issues/6654 | |
| 192 | - // var ckpt = CheckpointState.Parser.ParseFrom(file_content); | ||
| 193 | - var ckpt = new CheckpointState(); | ||
| 194 | - var field = CheckpointState.Descriptor.FindFieldByName("model_checkpoint_path"); | ||
| 195 | - ckpt.ModelCheckpointPath = file_content.FirstOrDefault(x => x.StartsWith(field.Name + ":")).Substring(field.Name.Length + 2); | ||
| 196 | - // remove first and last quote. | ||
| 197 | - ckpt.ModelCheckpointPath = ckpt.ModelCheckpointPath.Substring(1, ckpt.ModelCheckpointPath.Length - 2); | ||
| 198 | - | ||
| 199 | - field = CheckpointState.Descriptor.FindFieldByName("all_model_checkpoint_paths"); | ||
| 200 | - file_content.Where(x => x.StartsWith(field.Name + ":")) | ||
| 201 | - .ToList() | ||
| 202 | - .ForEach(x => | ||
| 203 | - { | ||
| 204 | - string value = x.Substring(field.Name.Length + 2); | ||
| 205 | - ckpt.AllModelCheckpointPaths.Add(value.Substring(1, value.Length - 2)); | ||
| 206 | - }); | ||
| 207 | - | ||
| 193 | + var ckpt = CheckpointState.Parser.ParseText(file_content); | ||
| 208 | 194 | if (string.IsNullOrEmpty(ckpt.ModelCheckpointPath)) | |
| 209 | 195 | throw new ValueError($"Invalid checkpoint state loaded from {checkpoint_dir}"); | |
| 210 | 196 | // For relative model_checkpoint_path and all_model_checkpoint_paths, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments