Browse Source

Fix the example errors caused by (#1022).

tags/v0.100.5-BERT-load
Yaohui Liu 2 years ago
parent
commit
8ee2e9a282
No known key found for this signature in database GPG Key ID: E86D01E1809BD23E
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      src/TensorFlowNET.Core/Util/ProtoUtils.cs
  2. +1
    -1
      src/TensorFlowNET.Core/Variables/ResourceVariable.cs

+ 1
- 1
src/TensorFlowNET.Core/Util/ProtoUtils.cs View File

@@ -10,7 +10,7 @@ namespace Tensorflow.Util
{ {
return valueCase switch return valueCase switch
{ {
AttrValue.ValueOneofCase.S => value.S,
AttrValue.ValueOneofCase.S => value.S.ToStringUtf8(),
AttrValue.ValueOneofCase.I => value.I, AttrValue.ValueOneofCase.I => value.I,
AttrValue.ValueOneofCase.F => value.F, AttrValue.ValueOneofCase.F => value.F,
AttrValue.ValueOneofCase.B => value.B, AttrValue.ValueOneofCase.B => value.B,


+ 1
- 1
src/TensorFlowNET.Core/Variables/ResourceVariable.cs View File

@@ -174,7 +174,7 @@ namespace Tensorflow


base.__init__(trainable: trainable, base.__init__(trainable: trainable,
shape: shape, shape: shape,
dtype: dtype,
dtype: _dtype,
handle: handle, handle: handle,
name: name, name: name,
unique_id: unique_id, unique_id: unique_id,


Loading…
Cancel
Save