grain.optim

A module for gradient descent optimizer

Members

Aliases

StateDict
alias StateDict = UntypedVariable[string]

structure to memorize the stats e.g., momentum

Functions

transform
void transform(Variable!(T, dim, HostStorage) src, ref Variable!(T, dim, HostStorage) dst, T alpha = 1, T beta = 0)

CPU version of cudnn.transform

update
void update(ref O optimizer)

public api to update a target model

zeroGrad
void zeroGrad(ref C chain)

fill gradient arrays with zero

Structs

AdaDelta
struct AdaDelta(Chain)

http://www.matthewzeiler.com/pubs/googleTR2012/googleTR2012.pdf

AdaGrad
struct AdaGrad(Chain)

http://jmlr.org/papers/v12/duchi11a.html

Adam
struct Adam(Chain)

https://arxiv.org/pdf/1412.6980v8.pdf

SGD
struct SGD(Chain)

stochastic gradient descent optimizer

Variables

isOptimizer
enum bool isOptimizer(T);

trait to identify optimizer

Meta