API

pytrio.AdamParams

class AdamParams(BaseModel):
    learning_rate: float = 0.0001
    beta1: float = 0.9
    beta2: float = 0.95
    eps: float = 1e-12
    weight_decay: float = 0.0
    grad_clip_norm: float = 0.0

AdamParams configures the Adam optimizer and is passed to TrainingClient.optim_step().

training_client.optim_step(AdamParams(learning_rate=1e-4)).result()

Parameters

ParameterTypeDefaultDescription
learning_ratefloat1e-4Learning rate
beta1float0.9Decay factor for the first moment estimate
beta2float0.95Decay factor for the second moment estimate
epsfloat1e-12Numerical stability term that prevents division by zero
weight_decayfloat0.0Weight decay coefficient
grad_clip_normfloat0.0Upper bound for gradient clipping norm
Was this documentation helpful?

On this page