Safe Haskell | None |
---|---|
Language | Haskell2010 |
Encoder and decoder for the TensorFlow "TFRecords" format.
Synopsis
- putTFRecord :: ByteString -> Put
- getTFRecord :: Get ByteString
- getTFRecords :: Get [ByteString]
- getTFRecordLength :: Get Word64
- getTFRecordData :: Word64 -> Get ByteString
- putTFRecordLength :: Word64 -> Put
- putTFRecordData :: ByteString -> Put
Records
putTFRecord :: ByteString -> Put Source #
Put one TFRecord with the given contents.
getTFRecord :: Get ByteString Source #
Parse one TFRecord.
getTFRecords :: Get [ByteString] Source #
Parse many TFRecords as a list. Note you probably want streaming instead as provided by the tensorflow-records-conduit package.
Implementation
These may be useful for encoding or decoding to types other than
ByteString
that have their own Cereal codecs.
getTFRecordLength :: Get Word64 Source #
Get a length and verify its checksum.
getTFRecordData :: Word64 -> Get ByteString Source #
Get a record payload and verify its checksum.
putTFRecordLength :: Word64 -> Put Source #
Put a record length and its checksum.
putTFRecordData :: ByteString -> Put Source #
Put a record payload and its checksum.