model

package
v0.0.0-...-2c46ed6 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator interface {
	Get(index int) (x, y *[]tensor.Vector)
	Len() int
}

type Layer

type Layer interface {
	Activate(input *tensor.Vector) (output *tensor.Vector)
	Bytes() ([]byte, error)
	Load(b []byte) error
	Derive(activation, cost *tensor.Vector)
	Adjust(delta *[][]float64)
	Init(neuronsCount, weightsCount int)
	NextCost(cost *tensor.Vector) (nextCost *tensor.Vector)
}

type Model

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

func New

func New(options ...Option) *Model

func (*Model) Add

func (m *Model) Add(neuronsCount int, layer Layer)

func (*Model) Compile

func (m *Model) Compile() error

func (*Model) Fit

func (m *Model) Fit()

func (*Model) Load

func (m *Model) Load(filename string) (err error)

func (*Model) Predict

func (m *Model) Predict(xBatch *[]tensor.Vector) *[]tensor.Vector

func (*Model) Save

func (m *Model) Save(filename string) (err error)

type Option

type Option func(*Model)

func WithBinaryAccuracy

func WithBinaryAccuracy() Option

func WithCategoricalAccuracy

func WithCategoricalAccuracy() Option

func WithCrossEntropyLoss

func WithCrossEntropyLoss() Option

func WithEpochs

func WithEpochs(epochs int) Option

func WithInputShape

func WithInputShape(shape tensor.Shape) Option

func WithOptimizer

func WithOptimizer(o optimizers.Optimizer) Option

func WithTestingGenerator

func WithTestingGenerator(g Generator) Option

func WithTrainingGenerator

func WithTrainingGenerator(g Generator) Option

func WithValidatingGenerator

func WithValidatingGenerator(g Generator) Option

func WithVerbosity

func WithVerbosity(verbose bool) Option

Jump to

Keyboard shortcuts

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