public class Adam<T extends AbstractFloat = Float> implements Optimizer<T>
Adaptive moment estimation with per-parameter state and bias correction. Float16 parameters use FP32 master weights and moments; Float/Double retain their own precision. One instance retains its parameter identities across fit calls; use another optimizer to reset it. A fused buffer pass avoids per-element boxing and intermediate tensors.
optimizer = Adam<Float>(learningRate=0.001)
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | beta1beta1 as Double |
First-moment decay. |
| public readonly property | beta2beta2 as Double |
Second-moment decay. |
| public readonly property | checkpointStatescheckpointStates as ImmutableList<AdamState<T>> |
Snapshot of parameter states for checkpoint transport, not tensor copies. |
| public readonly property | epsilonepsilon as Double |
Stabilizer outside the square root. |
| public readonly property | learningRatelearningRate as Double |
Positive learning rate. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | Adam | Configures Adam without weight decay or AMSGrad. |
| Modifier and Type | Member | Description |
|---|---|---|
| public override | apply | Updates moments and one parameter in place without altering the derivative. |
| public | restoreCheckpointrestoreCheckpoint(states as IList<AdamState<T>>) as Void |
Restores checked per-parameter moments and bias-correction powers. |