trainer

package
Version: v0.0.0-...-6c14c34 Latest Latest
Warning

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

Go to latest
Published: May 30, 2021 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

Source Files

Jump to

Keyboard shortcuts

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