Documentation ¶
Overview ¶
Package tfrecord is an obvious tfrecord IO implementation
Format spec: https://www.tensorflow.org/tutorials/load_data/tfrecord, assume all numbers are little-endian although not actually defined in spec.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrChecksum = errors.New("checksum error in TFRecord")
ErrChecksum is error returned when TFRecord content doesn't pass checksum. It indicates data corruption or wrong file format.
Functions ¶
This section is empty.
Types ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
Iterator iterates TFRecords through an io.Reader
func NewIterator ¶
NewIterator creates a Iterator. Iterator pre-allocates and reuse buffer to avoid frequent buffer allocation, bufSize should be set to upper-bound of expected common record size. when checkDataCRC is true, check CRC of data content, this is the recommend setup because checking CRC of data won't be performance bottleneck in most cases.