From 0bf6ec0a74e298586c944715e68e7e0aa6b6eb1d Mon Sep 17 00:00:00 2001 From: Lee Reid Date: Tue, 13 Apr 2021 17:39:49 +0200 Subject: [PATCH] Fix casting --- 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 34070035..a0ad549e 100644 --- a/src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs +++ b/src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs @@ -531,7 +531,7 @@ namespace Tensorflow dims: nd.shape.Select(i => (long)i).ToArray(), num_dims: nd.ndim, data: arraySlice.Address, - len: (ulong)(nd.size * nd.dtypesize)); + len: (ulong)nd.size * (ulong)nd.dtypesize); // if TF decided not to perform copy, hold reference for given NDArray. if (TensorDataPointer.ToPointer() == arraySlice.Address)