public class NesterovUpdateCalculator<M extends SmoothParametrized<M>> extends Object implements ParameterUpdateCalculator<M,NesterovParameterUpdate>
Modifier and Type | Field and Description |
---|---|
protected double |
momentum
Momentum constant.
|
Constructor and Description |
---|
NesterovUpdateCalculator(double learningRate,
double momentum)
Construct NesterovUpdateCalculator.
|
Modifier and Type | Method and Description |
---|---|
NesterovParameterUpdate |
calculateNewUpdate(M mdl,
NesterovParameterUpdate updaterParameters,
int iteration,
Matrix inputs,
Matrix groundTruth)
Calculate new update.
|
NesterovParameterUpdate |
init(M mdl,
IgniteFunction<Vector,IgniteDifferentiableVectorToDoubleFunction> loss)
Initializes the update calculator.
|
<M1 extends M> |
update(M1 obj,
NesterovParameterUpdate update)
Update given obj with this parameters.
|
public NesterovUpdateCalculator(double learningRate, double momentum)
momentum
- Momentum constant.public NesterovParameterUpdate calculateNewUpdate(M mdl, NesterovParameterUpdate updaterParameters, int iteration, Matrix inputs, Matrix groundTruth)
calculateNewUpdate
in interface ParameterUpdateCalculator<M extends SmoothParametrized<M>,NesterovParameterUpdate>
mdl
- Model to be updated.updaterParameters
- Updater parameters to updateCache.iteration
- Current trainer iteration.inputs
- Inputs.groundTruth
- True values.public NesterovParameterUpdate init(M mdl, IgniteFunction<Vector,IgniteDifferentiableVectorToDoubleFunction> loss)
init
in interface ParameterUpdateCalculator<M extends SmoothParametrized<M>,NesterovParameterUpdate>
mdl
- Model to be trained.loss
- Loss function.public <M1 extends M> M1 update(M1 obj, NesterovParameterUpdate update)
update
in interface ParameterUpdateCalculator<M extends SmoothParametrized<M>,NesterovParameterUpdate>
obj
- Object to be updated.
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024