Browse Source

cleared warnings in the UnitTest project

pull/306/head
Kerry Jiang 6 years ago
parent
commit
d199c03d16
3 changed files with 4 additions and 3 deletions
  1. +1
    -2
      test/TensorFlowNET.UnitTest/PythonTest.cs
  2. +2
    -0
      test/TensorFlowNET.UnitTest/control_flow_ops_test/SwitchTestCase.cs
  3. +1
    -1
      test/TensorFlowNET.UnitTest/ops_test/ControlDependenciesTest.cs

+ 1
- 2
test/TensorFlowNET.UnitTest/PythonTest.cs View File

@@ -126,7 +126,6 @@ namespace TensorFlowNET.UnitTest
if (tensors == null)
return null;
return nest.map_structure(self._eval_tensor, tensors);
return null;
}
protected object _eval_tensor(object tensor)
@@ -145,7 +144,7 @@ namespace TensorFlowNET.UnitTest
// tensor.dense_shape)
//return (tensor as Tensor).numpy();
}
catch (Exception e)
catch (Exception)
{
throw new ValueError("Unsupported type: " + tensor.GetType());
}


+ 2
- 0
test/TensorFlowNET.UnitTest/control_flow_ops_test/SwitchTestCase.cs View File

@@ -18,10 +18,12 @@ namespace TensorFlowNET.UnitTest.control_flow_ops_test
//var embedding_matrix = variable_scope.get_variable(
//"embedding_matrix", initializer: new double[,] { { 2.0 }, { 3.0 } }, use_resource: true);
/*
Tensor cond(Tensor it, Tensor _)
{
return it < 5;
}
*/
// TODO: below code doesn't compile
//(Tensor, Tensor) body(Tensor it, Tensor cost)


+ 1
- 1
test/TensorFlowNET.UnitTest/ops_test/ControlDependenciesTest.cs View File

@@ -39,7 +39,7 @@ namespace TensorFlowNET.UnitTest.ops_test
[TestMethod]
public void TestEager()
{
Tensor a = null, c = null, d = null, e = null;
Tensor a = null, c = null;
object b = null;
var calls = 0;
Func<Tensor> future = () =>


Loading…
Cancel
Save