From 2b9bd5fb8c3249c3263fb0c0bbaf66941015de84 Mon Sep 17 00:00:00 2001 From: Eli Belash Date: Sat, 31 Aug 2019 16:47:43 +0300 Subject: [PATCH] Tensor.Creation.CreateTensorFromNDArray: Fixed AllocationReferenceHolder when sliced. --- src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs b/src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs index 003a7fd9..34edcb4f 100644 --- a/src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs +++ b/src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs @@ -523,7 +523,7 @@ namespace Tensorflow if (TF_TensorData(handle).ToPointer() == arraySlice.Address) { AllocationType = AllocationType.FromPointer; - AllocationReferenceHolder = nd.Unsafe.Storage; + AllocationReferenceHolder = arraySlice; } else AllocationType = AllocationType.Tensorflow;