grain ~master (2021-05-15T05:53:16Z)
Dub
Repo
MLP
grain
optim
Undocumented in source.
version(unittest)
struct
MLP (
T
alias
Storage
) {
import
grain
.
autograd
:
Variable
;
;
import
grain
.
chain
:
Linear
,
relu
;
;
alias
L
=
Linear
!(
T
,
Storage
)
;
L
fc1
;
L
fc2
;
L
fc3
;
this
(int nhidden);
auto
opCall
(Variable!(T, 2, Storage) x);
}
Constructors
this
this
(int nhidden)
Undocumented in source.
Members
Aliases
L
alias
L
=
Linear
!(
T
,
Storage
)
Undocumented in source.
Functions
opCall
auto
opCall
(Variable!(T, 2, Storage) x)
Undocumented in source. Be warned that the author may not have intended to support it.
Variables
fc1
L
fc1
;
fc2
L
fc2
;
fc3
L
fc3
;
Undocumented in source.
Meta
Source
See Implementation
grain
optim
aliases
StateDict
functions
make
transform
update
zeroGrad
structs
AdaDelta
AdaGrad
Adam
MLP
SGD
variables
isOptimizer