recurrent

package
v0.0.0-...-31ccac1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Train

func Train(l int, xt T, yp P, graph xmachina.Data, cap map[string]Capture)

Types

type Capture

type Capture interface {
	Train(i int, x, y float64) float64
	Predict(i int, x, y float64) float64
}

type DummyCapture

type DummyCapture struct {
	OutputCapture
}

func (*DummyCapture) Train

func (c *DummyCapture) Train(i int, x, y float64) float64

type EvolutionCapture

type EvolutionCapture struct {
	OutputCapture
}

func (*EvolutionCapture) Predict

func (c *EvolutionCapture) Predict(i int, x, y float64) float64

type OnceCapture

type OnceCapture struct {
	OutputCapture
}

func (*OnceCapture) Predict

func (c *OnceCapture) Predict(i int, x, y float64) float64

func (*OnceCapture) Train

func (c *OnceCapture) Train(i int, x, y float64) float64

type OutputCapture

type OutputCapture struct {
	Network net.NN
	// contains filtered or unexported fields
}

func (*OutputCapture) Predict

func (c *OutputCapture) Predict(i int, x, y float64) float64

func (*OutputCapture) Train

func (c *OutputCapture) Train(i int, x, y float64) float64

type P

type P func(i int, x float64) float64
var Sine P = func(_ int, x float64) float64 {
	return math.Sin(x)
}
var SineVar P = func(i int, x float64) float64 {
	return 0.3*math.Sin(x) + 0.3*math.Sin(2*x) + 0.3*math.Sin(3*x)
}

type SoftCapture

type SoftCapture struct {
	Network net.NN
	// contains filtered or unexported fields
}

func (SoftCapture) Predict

func (s SoftCapture) Predict(i int, x, y float64) float64

func (SoftCapture) Train

func (s SoftCapture) Train(i int, x, y float64) float64

type T

type T func(i int) float64

func X

func X(f float64) T

type VoidNetwork

type VoidNetwork struct {
	net.NetworkConfig
}

func (VoidNetwork) Predict

func (v VoidNetwork) Predict(input xmath.Vector) xmath.Vector

func (VoidNetwork) Train

func (v VoidNetwork) Train(input xmath.Vector, output xmath.Vector) (err xmath.Vector, weights map[net.Meta]net.Weights)

Directories

Path Synopsis
lstm
rnn

Jump to

Keyboard shortcuts

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