From 667a56661f50a143ec8bf1ef5c6a49512e49c98b Mon Sep 17 00:00:00 2001 From: Eli Belash Date: Thu, 22 Aug 2019 00:14:41 +0300 Subject: [PATCH] Tensor.Operations: Reverted commit --- src/TensorFlowNET.Core/Tensors/Tensor.Operators.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TensorFlowNET.Core/Tensors/Tensor.Operators.cs b/src/TensorFlowNET.Core/Tensors/Tensor.Operators.cs index 02d19e56..4b15864f 100644 --- a/src/TensorFlowNET.Core/Tensors/Tensor.Operators.cs +++ b/src/TensorFlowNET.Core/Tensors/Tensor.Operators.cs @@ -123,7 +123,7 @@ namespace Tensorflow if (y is Tensor tr) dtype = tr.dtype.as_base_dtype(); - using (var scope = ops.name_scope(null, name, new { x, y })) + return tf_with(ops.name_scope(null, name, new { x, y }), scope => { Tensor result = null; var x1 = ops.convert_to_tensor(x, dtype: dtype, name: "x"); @@ -154,7 +154,7 @@ namespace Tensorflow } return result; - } + }); } } }