Adagrad class
Implements the Adagrad optimizer.
Adagrad is an adaptive learning rate optimizer that provides individual learning rates for each parameter. It adapts the rates by dividing by the square root of the sum of all past squared gradients.
This makes it particularly well-suited for sparse data (like word embeddings), as parameters that are updated infrequently will receive larger updates.
Example
Optimizer optimizer = Adagrad(model.parameters, learningRate: 0.01);
Constructors
Properties
- epsilon → double
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- learningRate → double
-
The step size for the gradient updates.
finalinherited
-
parameters
→ List<
Tensor> -
The list of model parameters (weights and biases) that this optimizer will update.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
step(
) → void -
Performs a single optimization step according to the Adagrad update rule.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
zeroGrad(
) → void -
Resets the gradients of all parameters to zero.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited