Browse Source

fix tfhub cache issue for RetrainImage example. #248

tags/v0.9
Oceania2018 6 years ago
parent
commit
5466d952b1
2 changed files with 2 additions and 1 deletions
  1. BIN
      graph/InceptionV3.meta
  2. +2
    -1
      test/TensorFlowNET.Examples/ImageProcess/RetrainImageClassifier.cs

BIN
graph/InceptionV3.meta View File


+ 2
- 1
test/TensorFlowNET.Examples/ImageProcess/RetrainImageClassifier.cs View File

@@ -178,6 +178,7 @@ namespace TensorFlowNET.Examples.ImageProcess
print($"Save final result to : {output_graph}");
save_graph_to_file(output_graph, class_count);
File.WriteAllText(output_labels, string.Join("\n", image_lists.Keys));

return test_accuracy > 0.75f;
});
}
@@ -604,7 +605,7 @@ namespace TensorFlowNET.Examples.ImageProcess
// download variables.data checkpoint file.
url = "https://github.com/SciSharp/TensorFlow.NET/raw/master/data/tfhub_modules.zip";
Web.Download(url, data_dir, "tfhub_modules.zip");
Compress.UnZip(Path.Join(data_dir, "tfhub_modules.zip"), Path.Join(Path.GetTempPath(), "tfhub_modules"));
Compress.UnZip(Path.Join(data_dir, "tfhub_modules.zip"), "tfhub_modules");

// Prepare necessary directories that can be used during training
Directory.CreateDirectory(summaries_dir);


Loading…
Cancel
Save