rmsprop

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 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
	LR      mat.Float
	Epsilon mat.Float
	Decay   mat.Float
}

Config provides configuration settings for an RMSProp optimizer.

func NewConfig

func NewConfig(lr, epsilon, decay mat.Float) Config

NewConfig returns a new RMSProp Config.

func NewDefaultConfig

func NewDefaultConfig() Config

NewDefaultConfig returns a new Config with generically reasonable default values.

type RMSProp

type RMSProp struct {
	Config
}

The RMSProp method is a variant of AdaGrad where the squared sum of previous gradients is replaced with a moving average. References:

RMSProp: Divide the gradient by a running average of its recent magnitude
http://www.cs.toronto.edu/~tijmen/csc321/slides/lecture_slides_lec6.pdf

func New

func New(c Config) *RMSProp

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

func (*RMSProp) Delta

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

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

func (*RMSProp) Label

func (o *RMSProp) Label() int

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

func (*RMSProp) NewSupport

func (o *RMSProp) 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