Browse Source

scan unit test

pull/661/head
quanap5kr 5 years ago
parent
commit
81b31dfd3c
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      test/TensorFlowNET.UnitTest/ManagedAPI/ControlFlowApiTest.cs

+ 2
- 0
test/TensorFlowNET.UnitTest/ManagedAPI/ControlFlowApiTest.cs View File

@@ -47,10 +47,12 @@ namespace TensorFlowNET.UnitTest.ManagedAPI
Assert.AreEqual(10, (int)r); Assert.AreEqual(10, (int)r);
} }



[TestMethod, Ignore] [TestMethod, Ignore]
public void ScanFunctionGraphMode() public void ScanFunctionGraphMode()
{ {
tf.compat.v1.disable_eager_execution(); tf.compat.v1.disable_eager_execution();

Func<Tensor, Tensor, Tensor> fn = (prev, current) => tf.add(prev, current); Func<Tensor, Tensor, Tensor> fn = (prev, current) => tf.add(prev, current);
var input = tf.placeholder(TF_DataType.TF_FLOAT, new TensorShape(6)); var input = tf.placeholder(TF_DataType.TF_FLOAT, new TensorShape(6));
var scan = tf.scan(fn, input); var scan = tf.scan(fn, input);


Loading…
Cancel
Save