Versions in this module Expand all Collapse all v0 v0.3.1 May 11, 2020 Changes in this version + const KeyEntry + var FeatureType = &TFFeatureEnum + type Sample struct + Entries map[string]interface{} + func NewSample(entries ...map[string]interface{}) *Sample + type SampleChannel struct + func NewSampleChannel(bufSize int) *SampleChannel + func (c *SampleChannel) Close() + func (c *SampleChannel) Read() (*Sample, error) + func (c *SampleChannel) Write(sample *Sample) error + type SampleReadWriter interface + type SampleReader interface + Read func() (sample *Sample, err error) + type SampleWriter interface + Close func() + Write func(s *Sample) error + type TFExample struct + func NewTFExample() *TFExample + func (e *TFExample) AddBytes(name string, bs ...[]byte) + func (e *TFExample) AddBytesList(name string, bs [][]byte) + func (e *TFExample) AddFloat(name string, floats ...float32) + func (e *TFExample) AddFloatList(name string, floats []float32) + func (e *TFExample) AddImage(name string, img image.Image) error + func (e *TFExample) AddInt(name string, ints ...int) + func (e *TFExample) AddInt64(name string, ints ...int64) + func (e *TFExample) AddInt64List(name string, ints []int64) + func (e *TFExample) AddIntList(name string, ints []int) + func (e *TFExample) GetBytesList(name string) []byte + func (e *TFExample) GetFeature(name string) *proto.Feature + func (e *TFExample) GetFloat(name string) float32 + func (e *TFExample) GetFloatList(name string) []float32 + func (e *TFExample) GetImage(name string) (image.Image, error) + func (e *TFExample) GetInt64(name string) int64 + func (e *TFExample) GetInt64List(name string) []int64 + func (e *TFExample) HasFeature(name string) bool + func (e *TFExample) SetFeature(name string, feature *proto.Feature) + type TFExampleChannel struct + func NewTFExampleChannel(bufSize int) *TFExampleChannel + func (c *TFExampleChannel) Close() + func (c *TFExampleChannel) Read() (*TFExample, error) + func (c *TFExampleChannel) Write(example *TFExample) error + type TFExampleReadWriter interface + type TFExampleReader interface + Read func() (ex *TFExample, err error) + type TFExampleWriter interface + Close func() + Write func(ex *TFExample) error + type TFFeatureEnum struct + BYTES *cmn.TFFeatureBytes + BYTESLIST *cmn.TFFeatureBytesList + FLOAT32 *cmn.TFFeatureFloat + FLOAT32LIST *cmn.TFFeatureFloatList + INT64 *cmn.TFFeatureInt + INT64LIST *cmn.TFFeatureIntList + type TFFeatureType interface + FeatureType func() int + type TFRecordReader struct + func NewTFRecordReader(r io.Reader) *TFRecordReader + func (r *TFRecordReader) Read() (*TFExample, error) + func (r *TFRecordReader) ReadAllExamples(expectedSize ...int) ([]*TFExample, error) + func (r *TFRecordReader) ReadExamples(writer TFExampleWriter) error + func (r *TFRecordReader) ReadNext(message protobuf.Message) error + type TFRecordReaderInterface interface + Read func() (*TFExample, error) + ReadAllExamples func(expectedSize ...int) ([]*TFExample, error) + ReadExamples func(writer TFExampleWriter) error + ReadNext func(protobuf.Message) error + type TFRecordWriter struct + func NewTFRecordWriter(w io.Writer) *TFRecordWriter + func (w *TFRecordWriter) Write(p []byte) (n int, err error) + func (w *TFRecordWriter) WriteExample(example *TFExample) (n int, err error) + func (w *TFRecordWriter) WriteExamples(ch <-chan *TFExample) error + func (w *TFRecordWriter) WriteMessage(message protoreflect.ProtoMessage) (n int, err error) + func (w *TFRecordWriter) WriteMessages(reader TFExampleReader) error + func (w *TFRecordWriter) WriteMessagesAsync(reader TFExampleReader, numWorkers int) error + type TFRecordWriterInterface interface + WriteExample func(*TFExample) (n int, err error) + WriteMessage func(protobuf.Message) (n int, err error) + WriteMessages func(reader TFExampleReader) error + type TypesMap map[string]TFFeatureType