From 284d3b10330ba96149ba7efb3587560d0d1a531f Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Sat, 27 Jun 2020 14:43:43 -0700 Subject: [PATCH] Fix Tensor constructor for int32 --- src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs | 2 +- test/TensorFlowNET.UnitTest/GraphTest.cs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs b/src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs index 3c3f1546..3d7e4cbc 100644 --- a/src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs +++ b/src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs @@ -64,7 +64,7 @@ namespace Tensorflow { unsafe { - _handle = TF_NewTensor(tf.int32, dims: null, num_dims: 0, data: null, len: sizeof(int)); + _handle = TF_NewTensor(tf.int32, dims: null, num_dims: 0, data: &value, len: sizeof(int)); } } diff --git a/test/TensorFlowNET.UnitTest/GraphTest.cs b/test/TensorFlowNET.UnitTest/GraphTest.cs index 9deb5361..1ff0d40a 100644 --- a/test/TensorFlowNET.UnitTest/GraphTest.cs +++ b/test/TensorFlowNET.UnitTest/GraphTest.cs @@ -7,7 +7,6 @@ using static Tensorflow.Binding; namespace TensorFlowNET.UnitTest.NativeAPI { - [Ignore] [TestClass] public class GraphTest : CApiTest {