optimizer

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adagrad

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

func NewAdagrad

func NewAdagrad(lr, weightDecay, epsilon float64) *Adagrad

func (*Adagrad) Print

func (adagrad *Adagrad) Print()

func (*Adagrad) Save

func (adagrad *Adagrad) Save() *pb.Optimizer

func (Adagrad) SetLr

func (opt Adagrad) SetLr(lr float64)

func (Adagrad) Update

func (opt Adagrad) Update(grads, params []*params.Params)

type Adam

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

func NewAdam

func NewAdam(lr, weightDecay, beta1, beta2, epsilon float64) *Adam

func (*Adam) Print

func (adam *Adam) Print()

func (*Adam) Save

func (adam *Adam) Save() *pb.Optimizer

func (Adam) SetLr

func (opt Adam) SetLr(lr float64)

func (Adam) Update

func (opt Adam) Update(grads, params []*params.Params)

type Optimizer

type Optimizer interface {
	Update(grads, params []*params.Params)
	Save() *pb.Optimizer
	Print()
	SetLr(lr float64)
}

func Load

func Load(opt *pb.Optimizer) Optimizer

type SGD

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

func NewSGD

func NewSGD(lr, weightDecay float64) *SGD

func (SGD) Print

func (opt SGD) Print()

func (*SGD) Save

func (sgd *SGD) Save() *pb.Optimizer

func (SGD) SetLr

func (opt SGD) SetLr(lr float64)

func (SGD) Update

func (opt SGD) Update(grads, params []*params.Params)

Jump to

Keyboard shortcuts

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