Skip to content

Commit f4227db

Browse files
committed
update xor.meta with named tensors
1 parent 438a0f9 commit f4227db

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

graph/xor.meta

-75 Bytes
Binary file not shown.

test/TensorFlowNET.Examples/NeuralNetXor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ private float RunWithImportedGraph()
6666

6767
tf.train.import_meta_graph("graph/xor.meta");
6868

69-
var features = graph.get_operation_by_name("Placeholder");
70-
var labels = graph.get_operation_by_name("Placeholder_1");
69+
Tensor features = graph.get_operation_by_name("Placeholder");
70+
Tensor labels = graph.get_operation_by_name("Placeholder_1");
7171
Tensor loss = graph.get_operation_by_name("loss");
7272

7373
var init = tf.global_variables_initializer();
@@ -144,7 +144,7 @@ public void PrepareData()
144144

145145
// download graph meta data
146146
string url = "https://raw.githubusercontent.com/SciSharp/TensorFlow.NET/master/graph/xor.meta";
147-
Web.Download(url, "graph", "kmeans.meta");
147+
Web.Download(url, "graph", "xor.meta");
148148
}
149149
}
150150
}

test/TensorFlowNET.Examples/Text/Word2Vec.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public class Word2Vec : Python, IExample
1717
public int Priority => 12;
1818
public bool Enabled { get; set; } = true;
1919
public string Name => "Word2Vec";
20+
public bool ImportGraph { get; set; } = true;
2021

2122
// Training Parameters
2223
float learning_rate = 0.1f;

0 commit comments

Comments
 (0)