golem ~master (2021-09-25T16:54:00Z)
Dub
Repo
Linear
golem
nn
Undocumented in source.
class
Linear (
T
size_t
InputDim
size_t
OutputDim
UseGradient
useGradient
=
UseGradient
.
yes
) {
Tensor
!(
T
, [
InputDim
,
OutputDim
],
useGradient
)
weights
;
Tensor
!(
T
, [
OutputDim
],
useGradient
)
bias
;
alias
parameters
=
AliasSeq
!(
weights
,
bias
)
;
this
();
this
(T initial);
this
(T initialWeight, T initialBias);
auto
opCall
(Tensor!(T, Shape, useGradient) x);
static if
(
useGradient
)
void
resetGrads
();
}
Constructors
this
this
()
Undocumented in source.
this
this
(T initial)
Undocumented in source.
this
this
(T initialWeight, T initialBias)
Undocumented in source.
Members
Aliases
parameters
alias
parameters
=
AliasSeq
!(
weights
,
bias
)
Undocumented in source.
Functions
opCall
auto
opCall
(Tensor!(T, Shape, useGradient) x)
Undocumented in source. Be warned that the author may not have intended to support it.
resetGrads
void
resetGrads
()
Undocumented in source. Be warned that the author may not have intended to support it.
Variables
bias
Tensor
!(
T
, [
OutputDim
],
useGradient
)
bias
;
Undocumented in source.
weights
Tensor
!(
T
, [
InputDim
,
OutputDim
],
useGradient
)
weights
;
Undocumented in source.
Meta
Source
See Implementation
golem
nn
classes
BatchNorm
Conv2D
LiftPool2D
Linear
Perceptron
Sequence
enums
hasParameters
structs
Activation