Browse Source

Merge pull request #562 from sharwell/fix-graph-test

Fix Tensor constructor for int32
tags/v0.20
Haiping GitHub 5 years ago
parent
commit
6f74c425a8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions
  1. +1
    -1
      src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs
  2. +0
    -1
      test/TensorFlowNET.UnitTest/GraphTest.cs

+ 1
- 1
src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs View File

@@ -64,7 +64,7 @@ namespace Tensorflow
{ {
unsafe 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));
} }
} }




+ 0
- 1
test/TensorFlowNET.UnitTest/GraphTest.cs View File

@@ -7,7 +7,6 @@ using static Tensorflow.Binding;


namespace TensorFlowNET.UnitTest.NativeAPI namespace TensorFlowNET.UnitTest.NativeAPI
{ {
[Ignore]
[TestClass] [TestClass]
public class GraphTest : CApiTest public class GraphTest : CApiTest
{ {


Loading…
Cancel
Save