utils

package
v0.0.0-...-018471a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2020 License: MIT Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidChecksum = errors.New("invalid crc")

ErrInvalidChecksum is returned if header or footer checksum is invalid

Functions

This section is empty.

Types

type Example

type Example = example.Example

An Example is a mostly-normalized data format for storing data for training and inference. It contains a key-value store (features); where each key (string) maps to a Feature message (which is oneof packed BytesList, FloatList, or Int64List).

func NewExampleFromMap

func NewExampleFromMap(m map[string]interface{}) (*Example, error)

NewExampleFromMap returns a new Example based on a given map of go values

type Feature

type Feature = example.Feature

Feature contains Lists which may hold zero or more values.

func NewFeature

func NewFeature(val interface{}) (*Feature, error)

NewFeature returns a Feature from a given go value

type PredictionLogReader

type PredictionLogReader struct {
	// contains filtered or unexported fields
}

PredictionLogReader reads tensorflow_serving.PredictionLog from a given io.Reader

func NewPredictionLogReader

func NewPredictionLogReader(r io.Reader) *PredictionLogReader

NewPredictionLogReader returns PredictionLogReader for a given io.Reader

func (*PredictionLogReader) Next

func (plr *PredictionLogReader) Next() error

Next advances PredictionLogReader or return io.EOF

func (*PredictionLogReader) Unmarshal

Unmarshal unmarshals current PredictionLog from the reader

type TFRecordReader

type TFRecordReader struct {
	// contains filtered or unexported fields
}

TFRecordReader reads tf records from a given io.Reader

func NewTFRecordReader

func NewTFRecordReader(reader io.Reader) *TFRecordReader

NewTFRecordReader returns a new TFRecordReader for a given io.Reader

func (*TFRecordReader) Bytes

func (tfr *TFRecordReader) Bytes() []byte

Bytes returns the current bytes from the reader

func (*TFRecordReader) Next

func (tfr *TFRecordReader) Next() error

Next returns the next TFRecord or io.EOF error if the files have been consumed

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL