Record Class AdamW.State
java.lang.Object
java.lang.Record
io.github.kirstenali.deepj.optimisers.AdamW.State
- Enclosing class:
AdamW
-
Constructor Summary
ConstructorsConstructorDescriptionState(long step, float learningRate, float beta1, float beta2, float epsilon, float weightDecay, List<Tensor> firstMoments, List<Tensor> secondMoments) State(long step, float learningRate, float beta1, float beta2, float epsilon, float weightDecay, List<Tensor> firstMoments, List<Tensor> secondMoments, Map<Integer, Tensor> masterWeights) Creates an instance of aStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatbeta1()Returns the value of thebeta1record component.floatbeta2()Returns the value of thebeta2record component.floatepsilon()Returns the value of theepsilonrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefirstMomentsrecord component.final inthashCode()Returns a hash code value for this object.floatReturns the value of thelearningRaterecord component.Returns the value of themasterWeightsrecord component.Returns the value of thesecondMomentsrecord component.longstep()Returns the value of thesteprecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of theweightDecayrecord component.
-
Constructor Details
-
State
-
State
public State(long step, float learningRate, float beta1, float beta2, float epsilon, float weightDecay, List<Tensor> firstMoments, List<Tensor> secondMoments, Map<Integer, Tensor> masterWeights) Creates an instance of aStaterecord class.- Parameters:
step- the value for thesteprecord componentlearningRate- the value for thelearningRaterecord componentbeta1- the value for thebeta1record componentbeta2- the value for thebeta2record componentepsilon- the value for theepsilonrecord componentweightDecay- the value for theweightDecayrecord componentfirstMoments- the value for thefirstMomentsrecord componentsecondMoments- the value for thesecondMomentsrecord componentmasterWeights- the value for themasterWeightsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
step
public long step()Returns the value of thesteprecord component.- Returns:
- the value of the
steprecord component
-
learningRate
public float learningRate()Returns the value of thelearningRaterecord component.- Returns:
- the value of the
learningRaterecord component
-
beta1
public float beta1()Returns the value of thebeta1record component.- Returns:
- the value of the
beta1record component
-
beta2
public float beta2()Returns the value of thebeta2record component.- Returns:
- the value of the
beta2record component
-
epsilon
public float epsilon()Returns the value of theepsilonrecord component.- Returns:
- the value of the
epsilonrecord component
-
weightDecay
public float weightDecay()Returns the value of theweightDecayrecord component.- Returns:
- the value of the
weightDecayrecord component
-
firstMoments
Returns the value of thefirstMomentsrecord component.- Returns:
- the value of the
firstMomentsrecord component
-
secondMoments
Returns the value of thesecondMomentsrecord component.- Returns:
- the value of the
secondMomentsrecord component
-
masterWeights
Returns the value of themasterWeightsrecord component.- Returns:
- the value of the
masterWeightsrecord component
-