From 8ee2e9a2826e30f8ed1b10f0036b086108f0690d Mon Sep 17 00:00:00 2001 From: Yaohui Liu Date: Thu, 20 Apr 2023 03:57:03 +0800 Subject: [PATCH] Fix the example errors caused by (#1022). --- src/TensorFlowNET.Core/Util/ProtoUtils.cs | 2 +- src/TensorFlowNET.Core/Variables/ResourceVariable.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TensorFlowNET.Core/Util/ProtoUtils.cs b/src/TensorFlowNET.Core/Util/ProtoUtils.cs index e7de8e30..c1557da4 100644 --- a/src/TensorFlowNET.Core/Util/ProtoUtils.cs +++ b/src/TensorFlowNET.Core/Util/ProtoUtils.cs @@ -10,7 +10,7 @@ namespace Tensorflow.Util { return valueCase switch { - AttrValue.ValueOneofCase.S => value.S, + AttrValue.ValueOneofCase.S => value.S.ToStringUtf8(), AttrValue.ValueOneofCase.I => value.I, AttrValue.ValueOneofCase.F => value.F, AttrValue.ValueOneofCase.B => value.B, diff --git a/src/TensorFlowNET.Core/Variables/ResourceVariable.cs b/src/TensorFlowNET.Core/Variables/ResourceVariable.cs index dbd934af..bc23df3e 100644 --- a/src/TensorFlowNET.Core/Variables/ResourceVariable.cs +++ b/src/TensorFlowNET.Core/Variables/ResourceVariable.cs @@ -174,7 +174,7 @@ namespace Tensorflow base.__init__(trainable: trainable, shape: shape, - dtype: dtype, + dtype: _dtype, handle: handle, name: name, unique_id: unique_id,