Class AdamParamsConfig
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<AdamParamsConfig.Builder,AdamParamsConfig>
The Adam optimizer hyperparameters used during an optimizer step.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal Doublebeta1()The exponential decay rate for the first moment estimates.final Doublebeta2()The exponential decay rate for the second moment estimates.static AdamParamsConfig.Builderbuilder()final Doubleeps()A small constant added to the denominator for numerical stability.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final DoubleThe maximum gradient norm for gradient clipping.final inthashCode()final DoubleThe learning rate for the optimizer.final DoubleThe learning rate multiplier for LoRA+ B matrices relative to A matrices.static Class<? extends AdamParamsConfig.Builder> Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final DoubleThe weight decay (L2 regularization) coefficient.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
learningRate
The learning rate for the optimizer. Must be greater than 0.
- Returns:
- The learning rate for the optimizer. Must be greater than 0.
-
beta1
The exponential decay rate for the first moment estimates.
- Returns:
- The exponential decay rate for the first moment estimates.
-
beta2
The exponential decay rate for the second moment estimates.
- Returns:
- The exponential decay rate for the second moment estimates.
-
eps
A small constant added to the denominator for numerical stability.
- Returns:
- A small constant added to the denominator for numerical stability.
-
weightDecay
The weight decay (L2 regularization) coefficient.
- Returns:
- The weight decay (L2 regularization) coefficient.
-
gradClipNorm
The maximum gradient norm for gradient clipping. Gradients are scaled down if their norm exceeds this value.
- Returns:
- The maximum gradient norm for gradient clipping. Gradients are scaled down if their norm exceeds this value.
-
loraPlusLrRatio
The learning rate multiplier for LoRA+ B matrices relative to A matrices. When set, B matrices use
learningRate * loraPlusLrRatiowhile A matrices use the base learning rate.- Returns:
- The learning rate multiplier for LoRA+ B matrices relative to A matrices. When set, B matrices use
learningRate * loraPlusLrRatiowhile A matrices use the base learning rate.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<AdamParamsConfig.Builder,AdamParamsConfig> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-