From cd2f0c0ec18387fa2e10be28a5d2b9ee00e66853 Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Mon, 12 Jul 2021 23:51:40 -0500 Subject: [PATCH] fix make_tensor_proto didn't set dtype correctly. --- src/TensorFlowNET.Core/Tensors/tensor_util.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/TensorFlowNET.Core/Tensors/tensor_util.cs b/src/TensorFlowNET.Core/Tensors/tensor_util.cs index d4e6c7f1..e0cdd5e0 100644 --- a/src/TensorFlowNET.Core/Tensors/tensor_util.cs +++ b/src/TensorFlowNET.Core/Tensors/tensor_util.cs @@ -123,6 +123,8 @@ namespace Tensorflow } else values = Convert.ChangeType(values, new_system_dtype); + + dtype = values.GetDataType(); } shape = shape ?? values.GetShape();