Skip to content

Commit 1961e81

Browse files
committed
all examples passed, ready to merge to master.
1 parent 6d4fc81 commit 1961e81

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/TensorFlowNET.Core/Framework/graph_util_impl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public GraphDef convert_variables_to_constants(Session sess,
7878
}
7979

8080
// Gets map of variables and the associated data.
81-
NDArray returned_variables = null;
81+
NDArray[] returned_variables = null;
8282
if (variable_names != null)
8383
returned_variables = sess.run(variable_names);
8484

src/TensorFlowNET.Core/Sessions/_FetchHandler.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ public NDArray[] build_results(BaseSession session, NDArray[] tensor_values)
8282
case "String":
8383
full_values.Add(float.NaN);
8484
break;
85+
case "Char":
86+
full_values.Add(float.NaN);
87+
break;
8588
default:
8689
throw new NotImplementedException($"build_results tensor_values[0] {tensor_values[0].dtype.Name}");
8790
}

test/TensorFlowNET.Examples/TextProcessing/NER/LstmCrfNer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public bool Run()
8080

8181
private float run_epoch(Session sess, CoNLLDataset train, CoNLLDataset dev, int epoch)
8282
{
83-
NDArray results = null;
83+
NDArray[] results = null;
8484

8585
// iterate over dataset
8686
var batches = minibatches(train, hp.batch_size);

test/TensorFlowNET.Examples/TextProcessing/Word2Vec.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ from wi2 in wi.DefaultIfEmpty()
9797
if (step % eval_step == 0 || step == 1)
9898
{
9999
print("Evaluation...");
100-
var sim = sess.run(cosine_sim_op, new FeedItem(X, x_test));
100+
var sim = sess.run(cosine_sim_op, new FeedItem(X, x_test))[0];
101101
foreach(var i in range(len(eval_words)))
102102
{
103103
var nearest = (0f - sim[i]).argsort<float>()

0 commit comments

Comments
 (0)