Browse Source

all examples passed, ready to merge to master.

tags/v0.12
Oceania2018 6 years ago
parent
commit
1961e815e7
4 changed files with 6 additions and 3 deletions
  1. +1
    -1
      src/TensorFlowNET.Core/Framework/graph_util_impl.cs
  2. +3
    -0
      src/TensorFlowNET.Core/Sessions/_FetchHandler.cs
  3. +1
    -1
      test/TensorFlowNET.Examples/TextProcessing/NER/LstmCrfNer.cs
  4. +1
    -1
      test/TensorFlowNET.Examples/TextProcessing/Word2Vec.cs

+ 1
- 1
src/TensorFlowNET.Core/Framework/graph_util_impl.cs View File

@@ -78,7 +78,7 @@ namespace Tensorflow
}

// Gets map of variables and the associated data.
NDArray returned_variables = null;
NDArray[] returned_variables = null;
if (variable_names != null)
returned_variables = sess.run(variable_names);



+ 3
- 0
src/TensorFlowNET.Core/Sessions/_FetchHandler.cs View File

@@ -82,6 +82,9 @@ namespace Tensorflow
case "String":
full_values.Add(float.NaN);
break;
case "Char":
full_values.Add(float.NaN);
break;
default:
throw new NotImplementedException($"build_results tensor_values[0] {tensor_values[0].dtype.Name}");
}


+ 1
- 1
test/TensorFlowNET.Examples/TextProcessing/NER/LstmCrfNer.cs View File

@@ -80,7 +80,7 @@ namespace TensorFlowNET.Examples.Text.NER

private float run_epoch(Session sess, CoNLLDataset train, CoNLLDataset dev, int epoch)
{
NDArray results = null;
NDArray[] results = null;

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


+ 1
- 1
test/TensorFlowNET.Examples/TextProcessing/Word2Vec.cs View File

@@ -97,7 +97,7 @@ namespace TensorFlowNET.Examples
if (step % eval_step == 0 || step == 1)
{
print("Evaluation...");
var sim = sess.run(cosine_sim_op, new FeedItem(X, x_test));
var sim = sess.run(cosine_sim_op, new FeedItem(X, x_test))[0];
foreach(var i in range(len(eval_words)))
{
var nearest = (0f - sim[i]).argsort<float>()


Loading…
Cancel
Save