sample

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(r io.Reader) ([][]float64, [][]float64)

Read read samples from reader

func Write

func Write(w io.Writer, inputs, outputs [][]float64) error

Write write samples to w

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) ReadFeature

func (r *Reader) ReadFeature(idx uint32, data []float64) error

ReadFeature read feature data

func (*Reader) ReadLabel

func (r *Reader) ReadLabel(idx uint32, data []float64) error

ReadLabel read label data

func (*Reader) WriteTo

func (r *Reader) WriteTo(w io.Writer) (int64, error)

WriteTo write to

Jump to

Keyboard shortcuts

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