|
|
@@ -14,21 +14,21 @@ namespace TensorFlowNET.ExamplesTests |
|
|
|
public void BasicOperations()
|
|
|
|
{
|
|
|
|
tf.Graph().as_default();
|
|
|
|
new BasicOperations() { Enabled = true }.Train();
|
|
|
|
new BasicOperations() { Enabled = true }.Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
[TestMethod]
|
|
|
|
public void HelloWorld()
|
|
|
|
{
|
|
|
|
tf.Graph().as_default();
|
|
|
|
new HelloWorld() { Enabled = true }.Train();
|
|
|
|
new HelloWorld() { Enabled = true }.Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
[TestMethod]
|
|
|
|
public void ImageRecognition()
|
|
|
|
{
|
|
|
|
tf.Graph().as_default();
|
|
|
|
new HelloWorld() { Enabled = true }.Train();
|
|
|
|
new HelloWorld() { Enabled = true }.Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
[Ignore]
|
|
|
@@ -36,28 +36,28 @@ namespace TensorFlowNET.ExamplesTests |
|
|
|
public void InceptionArchGoogLeNet()
|
|
|
|
{
|
|
|
|
tf.Graph().as_default();
|
|
|
|
new InceptionArchGoogLeNet() { Enabled = true }.Train();
|
|
|
|
new InceptionArchGoogLeNet() { Enabled = true }.Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
[TestMethod]
|
|
|
|
public void KMeansClustering()
|
|
|
|
{
|
|
|
|
tf.Graph().as_default();
|
|
|
|
new KMeansClustering() { Enabled = true, IsImportingGraph = true, train_size = 500, validation_size = 100, test_size = 100, batch_size =100 }.Train();
|
|
|
|
new KMeansClustering() { Enabled = true, IsImportingGraph = true, train_size = 500, validation_size = 100, test_size = 100, batch_size =100 }.Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
[TestMethod]
|
|
|
|
public void LinearRegression()
|
|
|
|
{
|
|
|
|
tf.Graph().as_default();
|
|
|
|
new LinearRegression() { Enabled = true }.Train();
|
|
|
|
new LinearRegression() { Enabled = true }.Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
[TestMethod]
|
|
|
|
public void LogisticRegression()
|
|
|
|
{
|
|
|
|
tf.Graph().as_default();
|
|
|
|
new LogisticRegression() { Enabled = true, training_epochs=10, train_size = 500, validation_size = 100, test_size = 100 }.Train();
|
|
|
|
new LogisticRegression() { Enabled = true, training_epochs=10, train_size = 500, validation_size = 100, test_size = 100 }.Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
[Ignore]
|
|
|
@@ -65,7 +65,7 @@ namespace TensorFlowNET.ExamplesTests |
|
|
|
public void NaiveBayesClassifier()
|
|
|
|
{
|
|
|
|
tf.Graph().as_default();
|
|
|
|
new NaiveBayesClassifier() { Enabled = false }.Train();
|
|
|
|
new NaiveBayesClassifier() { Enabled = false }.Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
[Ignore]
|
|
|
@@ -73,14 +73,14 @@ namespace TensorFlowNET.ExamplesTests |
|
|
|
public void NamedEntityRecognition()
|
|
|
|
{
|
|
|
|
tf.Graph().as_default();
|
|
|
|
new NamedEntityRecognition() { Enabled = true }.Train();
|
|
|
|
new NamedEntityRecognition() { Enabled = true }.Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
[TestMethod]
|
|
|
|
public void NearestNeighbor()
|
|
|
|
{
|
|
|
|
tf.Graph().as_default();
|
|
|
|
new NearestNeighbor() { Enabled = true, TrainSize = 500, ValidationSize = 100, TestSize = 100 }.Train();
|
|
|
|
new NearestNeighbor() { Enabled = true, TrainSize = 500, ValidationSize = 100, TestSize = 100 }.Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
[Ignore]
|
|
|
@@ -88,7 +88,7 @@ namespace TensorFlowNET.ExamplesTests |
|
|
|
public void TextClassificationTrain()
|
|
|
|
{
|
|
|
|
tf.Graph().as_default();
|
|
|
|
new TextClassificationTrain() { Enabled = true, DataLimit=100 }.Train();
|
|
|
|
new TextClassificationTrain() { Enabled = true, DataLimit=100 }.Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
[Ignore]
|
|
|
@@ -96,21 +96,21 @@ namespace TensorFlowNET.ExamplesTests |
|
|
|
public void TextClassificationWithMovieReviews()
|
|
|
|
{
|
|
|
|
tf.Graph().as_default();
|
|
|
|
new BinaryTextClassification() { Enabled = true }.Train();
|
|
|
|
new BinaryTextClassification() { Enabled = true }.Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
[TestMethod]
|
|
|
|
public void NeuralNetXor()
|
|
|
|
{
|
|
|
|
tf.Graph().as_default();
|
|
|
|
Assert.IsTrue(new NeuralNetXor() { Enabled = true, IsImportingGraph = false }.Train());
|
|
|
|
Assert.IsTrue(new NeuralNetXor() { Enabled = true, IsImportingGraph = false }.Run());
|
|
|
|
}
|
|
|
|
|
|
|
|
[TestMethod]
|
|
|
|
public void NeuralNetXor_ImportedGraph()
|
|
|
|
{
|
|
|
|
tf.Graph().as_default();
|
|
|
|
Assert.IsTrue(new NeuralNetXor() { Enabled = true, IsImportingGraph = true }.Train());
|
|
|
|
Assert.IsTrue(new NeuralNetXor() { Enabled = true, IsImportingGraph = true }.Run());
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@@ -118,7 +118,7 @@ namespace TensorFlowNET.ExamplesTests |
|
|
|
public void ObjectDetection()
|
|
|
|
{
|
|
|
|
tf.Graph().as_default();
|
|
|
|
Assert.IsTrue(new ObjectDetection() { Enabled = true, IsImportingGraph = true }.Train());
|
|
|
|
Assert.IsTrue(new ObjectDetection() { Enabled = true, IsImportingGraph = true }.Run());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|