Skip to content

Commit 438a0f9

Browse files
committed
Xor: import graph
1 parent 44f03f5 commit 438a0f9

18 files changed

Lines changed: 87 additions & 3 deletions

graph/xor.meta

11.6 KB
Binary file not shown.

test/TensorFlowNET.Examples/BasicEagerApi.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public class BasicEagerApi : IExample
1414
public int Priority => 100;
1515
public bool Enabled { get; set; } = false;
1616
public string Name => "Basic Eager";
17+
public bool ImportGraph { get; set; } = false;
1718

1819
private Tensor a, b, c, d;
1920

test/TensorFlowNET.Examples/BasicOperations.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public class BasicOperations : Python, IExample
1515
public bool Enabled { get; set; } = true;
1616
public int Priority => 2;
1717
public string Name => "Basic Operations";
18+
public bool ImportGraph { get; set; } = false;
19+
1820

1921
private Session sess;
2022

test/TensorFlowNET.Examples/HelloWorld.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ public class HelloWorld : Python, IExample
1414
public int Priority => 1;
1515
public bool Enabled { get; set; } = true;
1616
public string Name => "Hello World";
17+
public bool ImportGraph { get; set; } = false;
18+
1719

1820
public bool Run()
1921
{

test/TensorFlowNET.Examples/IExample.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ public interface IExample
1414
/// running order
1515
/// </summary>
1616
int Priority { get; }
17+
1718
/// <summary>
1819
/// True to run example
1920
/// </summary>
2021
bool Enabled { get; set; }
2122

23+
/// <summary>
24+
/// Set true to import the computation graph instead of building it.
25+
/// </summary>
26+
bool ImportGraph { get; set; }
27+
2228
string Name { get; }
2329

2430
/// <summary>

test/TensorFlowNET.Examples/ImageRecognition.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public class ImageRecognition : Python, IExample
1515
public int Priority => 7;
1616
public bool Enabled { get; set; } = true;
1717
public string Name => "Image Recognition";
18+
public bool ImportGraph { get; set; } = false;
19+
1820

1921
string dir = "ImageRecognition";
2022
string pbFile = "tensorflow_inception_graph.pb";

test/TensorFlowNET.Examples/InceptionArchGoogLeNet.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public class InceptionArchGoogLeNet : Python, IExample
2222
public bool Enabled { get; set; } = false;
2323
public int Priority => 100;
2424
public string Name => "Inception Arch GoogLeNet";
25+
public bool ImportGraph { get; set; } = false;
26+
2527

2628
string dir = "label_image_data";
2729
string pbFile = "inception_v3_2016_08_28_frozen.pb";

test/TensorFlowNET.Examples/KMeansClustering.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public class KMeansClustering : Python, IExample
2020
public int Priority => 8;
2121
public bool Enabled { get; set; } = true;
2222
public string Name => "K-means Clustering";
23+
public bool ImportGraph { get; set; } = true;
2324

2425
public int? train_size = null;
2526
public int validation_size = 5000;

test/TensorFlowNET.Examples/LinearRegression.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public class LinearRegression : Python, IExample
1515
public int Priority => 3;
1616
public bool Enabled { get; set; } = true;
1717
public string Name => "Linear Regression";
18+
public bool ImportGraph { get; set; } = false;
19+
1820

1921
public int training_epochs = 1000;
2022

test/TensorFlowNET.Examples/LogisticRegression.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ public class LogisticRegression : Python, IExample
2020
public int Priority => 4;
2121
public bool Enabled { get; set; } = true;
2222
public string Name => "Logistic Regression";
23+
public bool ImportGraph { get; set; } = false;
24+
2325

2426
public int training_epochs = 10;
2527
public int? train_size = null;

0 commit comments

Comments
 (0)