Browse Source

Fix casting

tags/v0.60-tf.numpy
Lee Reid Haiping 4 years ago
parent
commit
0bf6ec0a74
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/TensorFlowNET.Core/Tensors/Tensor.Creation.cs

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

@@ -531,7 +531,7 @@ namespace Tensorflow
dims: nd.shape.Select(i => (long)i).ToArray(), dims: nd.shape.Select(i => (long)i).ToArray(),
num_dims: nd.ndim, num_dims: nd.ndim,
data: arraySlice.Address, 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 TF decided not to perform copy, hold reference for given NDArray.
if (TensorDataPointer.ToPointer() == arraySlice.Address) if (TensorDataPointer.ToPointer() == arraySlice.Address)


Loading…
Cancel
Save