radam

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	gd.MethodConfig
	StepSize mat.Float
	Beta1    mat.Float
	Beta2    mat.Float
	Epsilon  mat.Float
}

Config provides configuration settings for a RAdam optimizer.

func NewConfig

func NewConfig(stepSize, beta1, beta2, epsilon mat.Float) Config

NewConfig returns a new RAdam Config. It panics if beta1 or beta2 are not in the range [0.0, 1.0).

func NewDefaultConfig

func NewDefaultConfig() Config

NewDefaultConfig returns a new Config with generically reasonable default values.

type RAdam

type RAdam struct {
	Config
	RoMax    mat.Float // The maximum length of the approximated SMA.
	TimeStep int
}

RAdam implements the RAdam gradient descent optimization method.

func New

func New(c Config) *RAdam

New returns a new RAdam optimizer, initialized according to the given configuration.

func (*RAdam) Delta

func (o *RAdam) Delta(param nn.Param) mat.Matrix

Delta returns the difference between the current params and where the method wants it to be.

func (*RAdam) IncBatch

func (o *RAdam) IncBatch()

IncBatch beats the occurrence of a new batch.

func (*RAdam) Label

func (o *RAdam) Label() int

Label returns the enumeration-like value which identifies this gradient descent method.

func (*RAdam) NewSupport

func (o *RAdam) NewSupport(r, c int) *nn.Payload

NewSupport returns a new support structure with the given dimensions.

Jump to

Keyboard shortcuts

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