From 9092c05b4c1636704aeef820876d2b14808e6530 Mon Sep 17 00:00:00 2001 From: Meinrad Recheis Date: Thu, 11 Apr 2019 19:10:57 +0200 Subject: [PATCH] with: added debugger attribute to let debugger not break in with but at the origin of the exception --- src/TensorFlowNET.Core/Python.cs | 3 +++ .../ops_test/CreateOpFromTfOperationTest.cs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/TensorFlowNET.Core/Python.cs b/src/TensorFlowNET.Core/Python.cs index 9d44300b..abb26ee0 100644 --- a/src/TensorFlowNET.Core/Python.cs +++ b/src/TensorFlowNET.Core/Python.cs @@ -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 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 py, Action 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 py, Func action) where TIn : IPython { try diff --git a/test/TensorFlowNET.UnitTest/ops_test/CreateOpFromTfOperationTest.cs b/test/TensorFlowNET.UnitTest/ops_test/CreateOpFromTfOperationTest.cs index 88064f21..0d0adba2 100644 --- a/test/TensorFlowNET.UnitTest/ops_test/CreateOpFromTfOperationTest.cs +++ b/test/TensorFlowNET.UnitTest/ops_test/CreateOpFromTfOperationTest.cs @@ -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");