Skip to content

Commit 059841b

Browse files
committed
Merge branch 'tf.keras-0.2'
2 parents 723de52 + db860f1 commit 059841b

27 files changed

+167
-244
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,5 @@ Example runner will download all the required files like training data and model
5555

5656
### Welcome to PR your example to us.
5757
Your contribution will make .NET community better than ever.
58-
59-
TensorFlow.NET is a part of [SciSharp STACK](https://scisharp.github.io/SciSharp/)
6058
<br>
61-
<a href="http://scisharpstack.org"><img src="https://github.com/SciSharp/SciSharp/blob/master/art/scisharp-stack.png" width="391" height="100" /></a>
59+
<a href="http://scisharpstack.org"><img src="https://github.com/SciSharp/SciSharp/blob/master/art/scisharp-stack.png" width="391" height="100" /></a>

src/TensorFlowNET.Examples/BasicModels/NaiveBayesClassifier.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ limitations under the License.
1919
using System.Collections.Generic;
2020
using System.IO;
2121
using Tensorflow;
22+
using Tensorflow.Keras.Utils;
2223
using TensorFlowNET.Examples.Utility;
2324
using static Tensorflow.Binding;
2425

src/TensorFlowNET.Examples/Converting/ConvertTensorflowModelToOpenCv.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Google.Protobuf;
22
using System.IO;
33
using Tensorflow;
4+
using Tensorflow.Keras.Utils;
45
using TensorFlowNET.Examples.Utility;
56
using static Tensorflow.Binding;
67

src/TensorFlowNET.Examples/ImageProcessing/Cifar10ResNetKerasFunctional.cs

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/TensorFlowNET.Examples/ImageProcessing/CnnInYourOwnData.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ limitations under the License.
2626
using System.Linq;
2727
using System.Threading.Tasks;
2828
using Tensorflow;
29+
using Tensorflow.Keras.Utils;
2930
using static SharpCV.Binding;
3031
using static Tensorflow.Binding;
3132

@@ -132,8 +133,8 @@ public override void PrepareData()
132133
{
133134
string url = "https://github.com/SciSharp/SciSharp-Stack-Examples/raw/master/data/data_CnnInYourOwnData.zip";
134135
Directory.CreateDirectory(Config.Name);
135-
Utility.Web.Download(url, Config.Name, "data_CnnInYourOwnData.zip");
136-
Utility.Compress.UnZip(Config.Name + "\\data_CnnInYourOwnData.zip", Config.Name);
136+
Web.Download(url, Config.Name, "data_CnnInYourOwnData.zip");
137+
Compress.UnZip(Config.Name + "\\data_CnnInYourOwnData.zip", Config.Name);
137138

138139
FillDictionaryLabel(Config.Name + "\\train");
139140

src/TensorFlowNET.Examples/ImageProcessing/DigitRecognitionRNN.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public ExampleConfig InitConfig()
5757
=> Config = new ExampleConfig
5858
{
5959
Name = "MNIST RNN (Graph)",
60-
Enabled = true,
60+
Enabled = false,
6161
IsImportingGraph = false,
6262
Priority = 20
6363
};

src/TensorFlowNET.Examples/ImageProcessing/ImageBackgroundRemoval.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.IO;
22
using Tensorflow;
3+
using Tensorflow.Keras.Utils;
34
using TensorFlowNET.Examples.Utility;
45
using static Tensorflow.Binding;
56

src/TensorFlowNET.Examples/ImageProcessing/ImageClassificationKeras.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public ExampleConfig InitConfig()
1616
=> Config = new ExampleConfig
1717
{
1818
Name = "Image Classification (Keras)",
19-
Enabled = true,
19+
Enabled = false,
2020
Priority = 18
2121
};
2222

src/TensorFlowNET.Examples/ImageProcessing/ImageRecognitionInception.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Drawing;
55
using System.IO;
66
using Tensorflow;
7+
using Tensorflow.Keras.Utils;
78
using static Tensorflow.Binding;
89
using Console = Colorful.Console;
910

@@ -93,17 +94,17 @@ public override void PrepareData()
9394
// get model file
9495
string url = "https://storage.googleapis.com/download.tensorflow.org/models/inception5h.zip";
9596

96-
Utility.Web.Download(url, dir, "inception5h.zip");
97+
Web.Download(url, dir, "inception5h.zip");
9798

98-
Utility.Compress.UnZip(Path.Join(dir, "inception5h.zip"), dir);
99+
Compress.UnZip(Path.Join(dir, "inception5h.zip"), dir);
99100

100101
// download sample picture
101102
Directory.CreateDirectory(Path.Join(dir, "img"));
102103
url = $"https://raw.githubusercontent.com/tensorflow/tensorflow/master/tensorflow/examples/label_image/data/grace_hopper.jpg";
103-
Utility.Web.Download(url, Path.Join(dir, "img"), "grace_hopper.jpg");
104+
Web.Download(url, Path.Join(dir, "img"), "grace_hopper.jpg");
104105

105106
url = $"https://raw.githubusercontent.com/SciSharp/TensorFlow.NET/master/data/shasta-daisy.jpg";
106-
Utility.Web.Download(url, Path.Join(dir, "img"), "shasta-daisy.jpg");
107+
Web.Download(url, Path.Join(dir, "img"), "shasta-daisy.jpg");
107108

108109
// load image file
109110
var files = Directory.GetFiles(Path.Join(dir, "img"));

src/TensorFlowNET.Examples/ImageProcessing/InceptionArchGoogLeNet.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
using System.IO;
44
using System.Linq;
55
using Tensorflow;
6+
using Tensorflow.Keras.Utils;
7+
using TensorFlowNET.Examples.Utility;
68
using static Tensorflow.Binding;
79

810
namespace TensorFlowNET.Examples
@@ -98,14 +100,14 @@ public override void PrepareData()
98100
// get model file
99101
string url = "https://storage.googleapis.com/download.tensorflow.org/models/inception_v3_2016_08_28_frozen.pb.tar.gz";
100102

101-
Utility.Web.Download(url, dir, $"{pbFile}.tar.gz");
103+
Web.Download(url, dir, $"{pbFile}.tar.gz");
102104

103-
Utility.Compress.ExtractTGZ(Path.Join(dir, $"{pbFile}.tar.gz"), dir);
105+
Compress.ExtractTGZ(Path.Join(dir, $"{pbFile}.tar.gz"), dir);
104106

105107
// download sample picture
106108
string pic = "grace_hopper.jpg";
107109
url = $"https://raw.githubusercontent.com/tensorflow/tensorflow/master/tensorflow/examples/label_image/data/{pic}";
108-
Utility.Web.Download(url, dir, pic);
110+
Web.Download(url, dir, pic);
109111
}
110112
}
111113
}

0 commit comments

Comments
 (0)