Browse Source

with: added debugger attribute to let debugger not break in with but at the origin of the exception

tags/v0.9
Meinrad Recheis 6 years ago
parent
commit
9092c05b4c
2 changed files with 5 additions and 2 deletions
  1. +3
    -0
      src/TensorFlowNET.Core/Python.cs
  2. +2
    -2
      test/TensorFlowNET.UnitTest/ops_test/CreateOpFromTfOperationTest.cs

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

@@ -36,6 +36,7 @@ namespace Tensorflow
return instance;
}

[DebuggerNonUserCode()] // with "Just My Code" enabled this lets the debugger break at the origin of the exception
public static void with(IPython py, Action<IPython> action)
{
try
@@ -55,6 +56,7 @@ namespace Tensorflow
}
}

[DebuggerNonUserCode()] // with "Just My Code" enabled this lets the debugger break at the origin of the exception
public static void with<T>(T py, Action<T> action) where T : IPython
{
try
@@ -74,6 +76,7 @@ namespace Tensorflow
}
}

[DebuggerNonUserCode()] // with "Just My Code" enabled this lets the debugger break at the origin of the exception
public static TOut with<TIn, TOut>(TIn py, Func<TIn, TOut> action) where TIn : IPython
{
try


+ 2
- 2
test/TensorFlowNET.UnitTest/ops_test/CreateOpFromTfOperationTest.cs View File

@@ -84,8 +84,8 @@ namespace TensorFlowNET.UnitTest.ops_test
var op = g.get_operation_by_name("cond/myop");
tf.train.export_meta_graph(@"D:\dev\tensorboard\logdir\sharp.meta.txt", as_text:true);
tf.train.export_meta_graph(@"D:\dev\tensorboard\logdir\sharp.meta", as_text: false);
//tf.train.export_meta_graph(@"D:\dev\tensorboard\logdir\sharp.meta.txt", as_text:true);
//tf.train.export_meta_graph(@"D:\dev\tensorboard\logdir\sharp.meta", as_text: false);
self.assertIsNotNone(op);
self.assertEqual(op.name, "cond/myop");


Loading…
Cancel
Save