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
1 changed files with 2 additions and 0 deletions

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