Browse Source

Merge branch 'master' into master

pull/481/head
Haiping GitHub 5 years ago
parent
commit
164df1184c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      src/TensorFlowNET.Core/Sessions/BaseSession.cs

+ 3
- 3
src/TensorFlowNET.Core/Sessions/BaseSession.cs View File

@@ -278,8 +278,8 @@ namespace Tensorflow
ret = NDArray.Scalar(*(bool*) srcAddress);
break;
case TF_DataType.TF_STRING:
using (var reader = new CodedInputStream(new IntPtr(srcAddress).Stream(8, (long)tensor.bytesize)))
ret = new NDArray(reader.ReadBytes().ToByteArray());
using (var reader = new CodedInputStream(new IntPtr(srcAddress).Stream(8, (long) tensor.bytesize)))
ret = new NDArray(reader.ReadBytes().ToByteArray());
break;
case TF_DataType.TF_UINT8:
ret = NDArray.Scalar(*(byte*) srcAddress);
@@ -467,4 +467,4 @@ namespace Tensorflow
}
}
}
}
}

Loading…
Cancel
Save