From d199c03d167def79c26b8b23d76c11b05a66ae20 Mon Sep 17 00:00:00 2001 From: Kerry Jiang Date: Wed, 24 Jul 2019 07:21:13 -0700 Subject: [PATCH] cleared warnings in the UnitTest project --- test/TensorFlowNET.UnitTest/PythonTest.cs | 3 +-- .../control_flow_ops_test/SwitchTestCase.cs | 2 ++ .../TensorFlowNET.UnitTest/ops_test/ControlDependenciesTest.cs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/TensorFlowNET.UnitTest/PythonTest.cs b/test/TensorFlowNET.UnitTest/PythonTest.cs index d5d78425..6ea4fd19 100644 --- a/test/TensorFlowNET.UnitTest/PythonTest.cs +++ b/test/TensorFlowNET.UnitTest/PythonTest.cs @@ -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()); } diff --git a/test/TensorFlowNET.UnitTest/control_flow_ops_test/SwitchTestCase.cs b/test/TensorFlowNET.UnitTest/control_flow_ops_test/SwitchTestCase.cs index b4322ab3..5d5c1b6e 100644 --- a/test/TensorFlowNET.UnitTest/control_flow_ops_test/SwitchTestCase.cs +++ b/test/TensorFlowNET.UnitTest/control_flow_ops_test/SwitchTestCase.cs @@ -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) diff --git a/test/TensorFlowNET.UnitTest/ops_test/ControlDependenciesTest.cs b/test/TensorFlowNET.UnitTest/ops_test/ControlDependenciesTest.cs index 16618b4b..21ee3f6d 100644 --- a/test/TensorFlowNET.UnitTest/ops_test/ControlDependenciesTest.cs +++ b/test/TensorFlowNET.UnitTest/ops_test/ControlDependenciesTest.cs @@ -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 future = () =>