Skip to content

Commit 46e2162

Browse files
committed
Fix model.evaluate in NeuralNetXorKeras.
1 parent 0454c7b commit 46e2162

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/TensorFlowNET.Core/APIs/c_api.cs

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ public static string StringPiece(IntPtr handle)
5353

5454
public unsafe static byte[] ByteStringPiece(IntPtr handle)
5555
{
56+
if (handle == IntPtr.Zero)
57+
{
58+
return new byte[0];
59+
}
60+
5661
byte* str_data = (byte*)handle.ToPointer();
5762
List<byte> bytes = new List<byte>();
5863
byte current = 255;

0 commit comments

Comments
 (0)