grain.optim

A module for gradient descent optimizer

Members

Aliases

StateDict
alias StateDict = UntypedVariable[string]

structure to memorize the stats e.g., momentum

Functions

make
auto make(C chain, Args args)
Undocumented in source. Be warned that the author may not have intended to support it.
transform
void transform(Variable!(T, dim, HostStorage) src, Variable!(T, dim, HostStorage) dst, T alpha, T beta)

CPU version of cudnn.transform

update
void update(O optimizer)

public api to update a target model

zeroGrad
void zeroGrad(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

MLP
struct MLP(T, alias Storage)
Undocumented in source.
SGD
struct SGD(Chain)

stochastic gradient descent optimizer

Variables

isOptimizer
enum bool isOptimizer(T);

trait to identify optimizer

Meta