Browse Source

Fix model.evaluate in NeuralNetXorKeras.

tags/v0.110.0-LSTM-Model
Haiping Chen 2 years ago
parent
commit
46e2162797
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      src/TensorFlowNET.Core/APIs/c_api.cs

+ 5
- 0
src/TensorFlowNET.Core/APIs/c_api.cs View File

@@ -53,6 +53,11 @@ namespace Tensorflow


public unsafe static byte[] ByteStringPiece(IntPtr handle) public unsafe static byte[] ByteStringPiece(IntPtr handle)
{ {
if (handle == IntPtr.Zero)
{
return new byte[0];
}

byte* str_data = (byte*)handle.ToPointer(); byte* str_data = (byte*)handle.ToPointer();
List<byte> bytes = new List<byte>(); List<byte> bytes = new List<byte>();
byte current = 255; byte current = 255;


Loading…
Cancel
Save