sample

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

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

Reader sample reader

func NewReader

func NewReader(r io.ReadSeeker) (*Reader, error)

NewReader create sample reader

func (*Reader) BatchSize

func (r *Reader) BatchSize() uint32

BatchSize get batch size

func (*Reader) FeatureSize

func (r *Reader) FeatureSize() uint32

FeatureSize get feature size

func (*Reader) LabelSize

func (r *Reader) LabelSize() uint32

LabelSize get label size

func (*Reader) ReadSample added in v1.0.2

func (r *Reader) ReadSample(idx uint32, features, labels []float32) error

ReadSample read sample data

type Writer added in v1.0.2

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

Writer sample writer

func NewWriter added in v1.0.2

func NewWriter(w io.WriteSeeker) *Writer

NewWriter create sample writer

func (*Writer) Close added in v1.0.2

func (w *Writer) Close() error

Close rewrite header

func (*Writer) WriteSample added in v1.0.2

func (w *Writer) WriteSample(features, labels []float32) error

WriteSample write sample data

Jump to

Keyboard shortcuts

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