Skip to content

Commit 2b9bd5f

Browse files
committed
Tensor.Creation.CreateTensorFromNDArray: Fixed AllocationReferenceHolder when sliced.
1 parent e4786b7 commit 2b9bd5f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ private unsafe IntPtr CreateTensorFromNDArray(NDArray nd, TF_DataType? given_dty
523523
if (TF_TensorData(handle).ToPointer() == arraySlice.Address)
524524
{
525525
AllocationType = AllocationType.FromPointer;
526-
AllocationReferenceHolder = nd.Unsafe.Storage;
526+
AllocationReferenceHolder = arraySlice;
527527
} else
528528
AllocationType = AllocationType.Tensorflow;
529529

0 commit comments

Comments
 (0)