|
@@ -178,6 +178,7 @@ namespace TensorFlowNET.Examples.ImageProcess |
|
|
print($"Save final result to : {output_graph}"); |
|
|
print($"Save final result to : {output_graph}"); |
|
|
save_graph_to_file(output_graph, class_count); |
|
|
save_graph_to_file(output_graph, class_count); |
|
|
File.WriteAllText(output_labels, string.Join("\n", image_lists.Keys)); |
|
|
File.WriteAllText(output_labels, string.Join("\n", image_lists.Keys)); |
|
|
|
|
|
|
|
|
return test_accuracy > 0.75f; |
|
|
return test_accuracy > 0.75f; |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
@@ -604,7 +605,7 @@ namespace TensorFlowNET.Examples.ImageProcess |
|
|
// download variables.data checkpoint file. |
|
|
// download variables.data checkpoint file. |
|
|
url = "https://github.com/SciSharp/TensorFlow.NET/raw/master/data/tfhub_modules.zip"; |
|
|
url = "https://github.com/SciSharp/TensorFlow.NET/raw/master/data/tfhub_modules.zip"; |
|
|
Web.Download(url, data_dir, "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 |
|
|
// Prepare necessary directories that can be used during training |
|
|
Directory.CreateDirectory(summaries_dir); |
|
|
Directory.CreateDirectory(summaries_dir); |
|
|