SGD class

Inheritance

Constructors

SGD(List<Tensor> parameters, {required double lr, double momentum = 0.0, double weightDecay = 0.0})

Properties

hashCode int
The hash code for this object.
no setterinherited
lr double
Current learning rate. Mutable so that LRSchedulers can adjust it across training steps.
getter/setter pairoverride
momentum double
final
parameters List<Tensor>
The parameters this optimizer updates. Order is stable.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
weightDecay double
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
step() → void
Apply one update step using each parameter's current .grad. Parameters with grad == null are skipped.
override
toString() String
A string representation of this object.
inherited
zeroGrad() → void
Zero the gradient buffer of every registered parameter.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited