Browse Source

ops.py.cs: fixed a bug in _NodeDef

tags/v0.9
Meinrad Recheis 6 years ago
parent
commit
0406d4588d
2 changed files with 8 additions and 7 deletions
  1. +4
    -3
      src/TensorFlowNET.Core/ops.py.cs
  2. +4
    -4
      test/TensorFlowNET.UnitTest/ControlDependenciesTest.cs

+ 4
- 3
src/TensorFlowNET.Core/ops.py.cs View File

@@ -193,11 +193,12 @@ namespace Tensorflow
node_def.Op = op_type;
node_def.Name = name;

foreach (var attr in attrs)
if (attrs != null)
{
node_def.Attr.Add(attr.Key, attr.Value);
foreach (var attr in attrs)
node_def.Attr.Add(attr.Key, attr.Value);
}
return node_def;
}



+ 4
- 4
test/TensorFlowNET.UnitTest/ControlDependenciesTest.cs View File

@@ -143,7 +143,7 @@ def _apply_op(g, *args, **kwargs):
*/
}
//[Ignore()]
[Ignore("Fails with message: Op type not registered 'FloatOutput' in binary running on ...")]
[TestMethod]
public void TestNested()
{
@@ -196,7 +196,7 @@ self.assertItemsEqual(b_1.op.control_inputs, b_2.op.control_inputs)
}
[Ignore("How to translate _apply_op into c#?")]
[Ignore("will fail due to unsupported op 'FloatOutput'")]
[TestMethod]
public void TestClear()
{
@@ -236,7 +236,7 @@ self.assertItemsEqual(b_1.op.control_inputs, b_2.op.control_inputs)
*/
}
[Ignore("How to translate _apply_op into c#?")]
[Ignore("will fail due to unsupported op 'FloatOutput'")]
[TestMethod]
public void TestComplex()
{
@@ -315,7 +315,7 @@ self.assertItemsEqual(b_1.op.control_inputs, b_2.op.control_inputs)
*/
}
[Ignore("How to translate _apply_op into c#?")]
[Ignore("will fail due to unsupported op 'FloatOutput'")]
[TestMethod]
public void TestRepeatedDependency()
{


Loading…
Cancel
Save