trainer

package
v0.0.0-...-8022e88 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimedOut = errors.New("training process timed out")

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	LearningRate      float64
	MiniBatchSize     int
	AverageLossCutoff float64
	MinLossCutoff     float64
	MaxIterations     int
	Timeout           time.Duration
}

type Data

type Data []Datum

func (Data) MiniBatch

func (d Data) MiniBatch(size int) (Data, error)

type Datum

type Datum struct {
	Data  []float64
	Truth []float64
}

type Trainer

type Trainer struct {
	Configuration
	Data
	Log io.Writer
}

func New

func New(c Configuration, d Data, log io.Writer) Trainer

TODO(justin): Validate configuration?

func (*Trainer) Train

func (t *Trainer) Train(nw network.Network) error

Jump to

Keyboard shortcuts

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