1
0
Fork 0
mirror of https://github.com/tensorflow/haskell.git synced 2024-12-26 11:39:46 +01:00

WIP: Update byte layout for TF_String tensors

This commit is contained in:
Bart Schuurmans 2023-01-17 17:22:50 +01:00
parent 627afab137
commit c5bfff9b4c

View file

@ -322,6 +322,8 @@ instance {-# OVERLAPPING #-} TensorDataType V.Vector ByteString where
-- at each element offset:
-- string length :: VarInt64
-- string data :: [Word8]
-- TODO: According to the v2.4.0 release notes, the byte layout for string
-- tensors has been changed to a contiguous array of TF_TStrings.
decodeTensorData tensorData =
either (\err -> error $ "Malformed TF_STRING tensor; " ++ err) id $
if expected /= count